Skip to content

Commit

Permalink
fix maui builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ipax77 committed Jul 17, 2024
1 parent 6b425d4 commit 26e7854
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 20 deletions.
54 changes: 36 additions & 18 deletions src/dsstats.db8services/Builds/BuildService.Players.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,42 @@ public async Task<BuildResponse> 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<PlayerUnitGroup>();

Expand Down
5 changes: 5 additions & 0 deletions src/dsstats.maui/dsstats.maui8/Services/ReplaysService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,9 @@ public async Task<int> GetReplaysCount(ReplaysRequest request, CancellationToken
{
return await remoteReplaysService.GetArcadeReplay(hash, token);
}

public Task<ArcadeReplayDto?> GetDssstatsArcadeReplay(string replayHash, CancellationToken token = default)
{
throw new NotImplementedException();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<ItemGroup>
<PackageReference Include="CsvHelper" Version="33.0.1" />
<PackageReference Include="IronPython.StdLib" Version="2.7.12" />
<PackageReference Include="s2protocol.NET" Version="0.8.1" />
<PackageReference Include="s2protocol.NET" Version="0.8.2" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/dsstats.ratings/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});

Expand Down

0 comments on commit 26e7854

Please sign in to comment.