mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Initial EF Core commit
This commit is contained in:
@ -19,6 +19,6 @@ namespace osu.Game.Online.API.Requests
|
||||
Progress += (current, total) => DownloadProgressed?.Invoke((float) current / total);
|
||||
}
|
||||
|
||||
protected override string Target => $@"beatmapsets/{BeatmapSet.OnlineBeatmapSetID}/download";
|
||||
protected override string Target => $@"beatmapsets/{BeatmapSet.BeatmapSetOnlineInfoId}/download";
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
private readonly BeatmapInfo beatmap;
|
||||
|
||||
private string lookupString => beatmap.OnlineBeatmapID > 0 ? beatmap.OnlineBeatmapID.ToString() : $@"lookup?checksum={beatmap.Hash}&filename={System.Uri.EscapeUriString(beatmap.Path)}";
|
||||
private string lookupString => beatmap.BeatmapOnlineInfoId > 0 ? beatmap.BeatmapOnlineInfoId.ToString() : $@"lookup?checksum={beatmap.Hash}&filename={System.Uri.EscapeUriString(beatmap.Path)}";
|
||||
|
||||
public GetBeatmapDetailsRequest(BeatmapInfo beatmap)
|
||||
{
|
||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Online.API.Requests
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
protected override string Target => $@"beatmapsets/search?q={query}&m={ruleset.ID ?? 0}&s={(int)rankStatus}&sort={sortCriteria.ToString().ToLower()}_{directionString}";
|
||||
protected override string Target => $@"beatmapsets/search?q={query}&m={ruleset.Id ?? 0}&s={(int)rankStatus}&sort={sortCriteria.ToString().ToLower()}_{directionString}";
|
||||
}
|
||||
|
||||
public class GetBeatmapSetsResponse : BeatmapMetadata
|
||||
@ -63,8 +63,8 @@ namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
return new BeatmapSetInfo
|
||||
{
|
||||
OnlineBeatmapSetID = onlineId,
|
||||
Metadata = this,
|
||||
BeatmapSetOnlineInfoId = onlineId,
|
||||
BeatmapMetadata = this,
|
||||
OnlineInfo = new BeatmapSetOnlineInfo
|
||||
{
|
||||
Author = new User
|
||||
@ -99,8 +99,8 @@ namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
return new BeatmapInfo
|
||||
{
|
||||
Metadata = this,
|
||||
Ruleset = rulesets.GetRuleset(ruleset),
|
||||
BeatmapMetadata = this,
|
||||
RulesetInfo = rulesets.GetRuleset(ruleset),
|
||||
StarDifficulty = starDifficulty,
|
||||
OnlineInfo = new BeatmapOnlineInfo
|
||||
{
|
||||
|
@ -18,8 +18,8 @@ namespace osu.Game.Online.API.Requests
|
||||
|
||||
public GetScoresRequest(BeatmapInfo beatmap)
|
||||
{
|
||||
if (!beatmap.OnlineBeatmapID.HasValue)
|
||||
throw new InvalidOperationException($"Cannot lookup a beatmap's scores without having a populated {nameof(BeatmapInfo.OnlineBeatmapID)}.");
|
||||
if (!beatmap.BeatmapOnlineInfoId.HasValue)
|
||||
throw new InvalidOperationException($"Cannot lookup a beatmap's scores without having a populated {nameof(BeatmapInfo.BeatmapOnlineInfoId)}.");
|
||||
|
||||
this.beatmap = beatmap;
|
||||
|
||||
@ -32,7 +32,7 @@ namespace osu.Game.Online.API.Requests
|
||||
score.ApplyBeatmap(beatmap);
|
||||
}
|
||||
|
||||
protected override string Target => $@"beatmaps/{beatmap.OnlineBeatmapID}/scores";
|
||||
protected override string Target => $@"beatmaps/{beatmap.BeatmapOnlineInfoId}/scores";
|
||||
}
|
||||
|
||||
public class GetScoresResponse
|
||||
@ -116,7 +116,7 @@ namespace osu.Game.Online.API.Requests
|
||||
public void ApplyBeatmap(BeatmapInfo beatmap)
|
||||
{
|
||||
Beatmap = beatmap;
|
||||
Ruleset = beatmap.Ruleset;
|
||||
Ruleset = beatmap.RulesetInfo;
|
||||
|
||||
// Evaluate the mod string
|
||||
Mods = Ruleset.CreateInstance().GetAllMods().Where(mod => modStrings.Contains(mod.ShortenedName)).ToArray();
|
||||
|
Reference in New Issue
Block a user