From 26e78547a81ff0f9de4955c769a247511186df80 Mon Sep 17 00:00:00 2001 From: ipax77 Date: Wed, 17 Jul 2024 07:30:55 +0200 Subject: [PATCH 1/2] fix maui builds --- .../Builds/BuildService.Players.cs | 54 ++++++++++++------- .../dsstats.maui8/Services/ReplaysService.cs | 5 ++ .../pax.dsstats.parser.csproj | 2 +- src/dsstats.ratings/Program.cs | 2 +- 4 files changed, 43 insertions(+), 20 deletions(-) diff --git a/src/dsstats.db8services/Builds/BuildService.Players.cs b/src/dsstats.db8services/Builds/BuildService.Players.cs index fc5b2710..23479591 100644 --- a/src/dsstats.db8services/Builds/BuildService.Players.cs +++ b/src/dsstats.db8services/Builds/BuildService.Players.cs @@ -14,24 +14,42 @@ public async Task ProducePlayerBuilds(BuildRequest request, Cance bool noEnd = end >= DateTime.Today.AddDays(-2); var ratingTypes = GetRatingTypes(request); - var query = from r in context.Replays - from rp in r.ReplayPlayers - from sp in rp.Spawns - from su in sp.Units - join rr in context.ReplayRatings on r.ReplayId equals rr.ReplayId - join rpr in context.ComboReplayPlayerRatings on rp.ReplayPlayerId equals rpr.ReplayPlayerId - where r.GameTime >= start - && (noEnd || r.GameTime < end) - && rp.Race == request.Interest - && (request.Versus == Commander.None || rp.OppRace == request.Versus) - && rr.LeaverType == LeaverType.None - && ratingTypes.Contains(rr.RatingType) - && sp.Breakpoint == request.Breakpoint - select new PlayerUnitGroup() - { - p = rp.Player, - su = su - }; + var query = IsSqlite ? + from r in context.Replays + from rp in r.ReplayPlayers + from sp in rp.Spawns + from su in sp.Units + join rr in context.ReplayRatings on r.ReplayId equals rr.ReplayId + where r.GameTime >= start + && (noEnd || r.GameTime < end) + && rp.Race == request.Interest + && (request.Versus == Commander.None || rp.OppRace == request.Versus) + && rr.LeaverType == LeaverType.None + && ratingTypes.Contains(rr.RatingType) + && sp.Breakpoint == request.Breakpoint + select new PlayerUnitGroup() + { + p = rp.Player, + su = su + } + : from r in context.Replays + from rp in r.ReplayPlayers + from sp in rp.Spawns + from su in sp.Units + join rr in context.ReplayRatings on r.ReplayId equals rr.ReplayId + join rpr in context.ComboReplayPlayerRatings on rp.ReplayPlayerId equals rpr.ReplayPlayerId + where r.GameTime >= start + && (noEnd || r.GameTime < end) + && rp.Race == request.Interest + && (request.Versus == Commander.None || rp.OppRace == request.Versus) + && rr.LeaverType == LeaverType.None + && ratingTypes.Contains(rr.RatingType) + && sp.Breakpoint == request.Breakpoint + select new PlayerUnitGroup() + { + p = rp.Player, + su = su + }; var predicate = PredicateBuilder.New(); diff --git a/src/dsstats.maui/dsstats.maui8/Services/ReplaysService.cs b/src/dsstats.maui/dsstats.maui8/Services/ReplaysService.cs index 4bbe2809..ab7f87c1 100644 --- a/src/dsstats.maui/dsstats.maui8/Services/ReplaysService.cs +++ b/src/dsstats.maui/dsstats.maui8/Services/ReplaysService.cs @@ -75,4 +75,9 @@ public async Task GetReplaysCount(ReplaysRequest request, CancellationToken { return await remoteReplaysService.GetArcadeReplay(hash, token); } + + public Task GetDssstatsArcadeReplay(string replayHash, CancellationToken token = default) + { + throw new NotImplementedException(); + } } diff --git a/src/dsstats.maui/pax.dsstats.parser/pax.dsstats.parser.csproj b/src/dsstats.maui/pax.dsstats.parser/pax.dsstats.parser.csproj index cd79426c..7b4f8fab 100644 --- a/src/dsstats.maui/pax.dsstats.parser/pax.dsstats.parser.csproj +++ b/src/dsstats.maui/pax.dsstats.parser/pax.dsstats.parser.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/dsstats.ratings/Program.cs b/src/dsstats.ratings/Program.cs index 675c137a..fcab23e2 100644 --- a/src/dsstats.ratings/Program.cs +++ b/src/dsstats.ratings/Program.cs @@ -35,7 +35,7 @@ static void Main(string[] args) services.AddLogging(options => { options.SetMinimumLevel(LogLevel.Information); - options.AddFilter("Microsoft.EntityFrameworkCore", LogLevel.Information); + options.AddFilter("Microsoft.EntityFrameworkCore", LogLevel.Warning); options.AddConsole(); }); From 2866fdd619444ca77598e3574958d5b67d9879df Mon Sep 17 00:00:00 2001 From: ipax77 Date: Wed, 17 Jul 2024 08:05:16 +0200 Subject: [PATCH 2/2] maui v2.0.5 --- README.md | 12 +++++++++++- src/dsstats.shared/Data.cs | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 90c10798..8295f5be 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,17 @@ We really like people helping us with the project. Nevertheless, take your time ## ChangeLog -
v2.0.4 +
v2.0.5 + +>- s2protocol v5.0.13.92440.0 (s2protocol.NET v0.8.3) +>- dotnet v8.0.7 (8.0.303) +>- Maui builds fixed +>- Maui hanging loading indicator fixed +>- Combo ratings replay mapping improved (~90% hit rate) + +
+ +
v2.0.4 >- Fixed Maui Replay duplicates import loop - thank you @Jurzal for reporting and helping to fix it! >- Unit Names and Colors for Replay-Unit-Map diff --git a/src/dsstats.shared/Data.cs b/src/dsstats.shared/Data.cs index 1052322d..36ac951c 100644 --- a/src/dsstats.shared/Data.cs +++ b/src/dsstats.shared/Data.cs @@ -1333,7 +1333,7 @@ public static (GameMode gameMode, int totalBans, int totalPicks) GetPickBanModeS public const string ReplayBlobDir = "/data/ds/replayblobs"; public const string MysqlFilesDir = "/data/mysqlfiles"; - public const string WasmVersion = "2.0.4"; + public const string WasmVersion = "2.0.5"; } public class LatestReplayEventArgs : EventArgs