mirror of
https://github.com/ppy/osu.git
synced 2025-01-08 05:52:54 +08:00
Fix lookups by beatmapinfo failing for imports of existing sores
This commit is contained in:
parent
a88b69ec43
commit
d2f0a921ca
@ -267,7 +267,9 @@ namespace osu.Game
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scoreInfo.BeatmapInfo == null)
|
var databasedBeatmap = BeatmapManager.QueryBeatmap(b => b.ID == scoreInfo.BeatmapInfo.ID);
|
||||||
|
|
||||||
|
if (databasedBeatmap == null)
|
||||||
{
|
{
|
||||||
notifications.Post(new SimpleNotification
|
notifications.Post(new SimpleNotification
|
||||||
{
|
{
|
||||||
@ -279,7 +281,7 @@ namespace osu.Game
|
|||||||
|
|
||||||
ruleset.Value = scoreInfo.Ruleset;
|
ruleset.Value = scoreInfo.Ruleset;
|
||||||
|
|
||||||
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(scoreInfo.BeatmapInfo);
|
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(databasedBeatmap);
|
||||||
Beatmap.Value.Mods.Value = scoreInfo.Mods;
|
Beatmap.Value.Mods.Value = scoreInfo.Mods;
|
||||||
|
|
||||||
menu.Push(new PlayerLoader(new ReplayPlayer(ScoreManager.GetScore(scoreInfo).Replay)));
|
menu.Push(new PlayerLoader(new ReplayPlayer(ScoreManager.GetScore(scoreInfo).Replay)));
|
||||||
|
@ -16,6 +16,9 @@ namespace osu.Game.Scoring
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override IQueryable<ScoreInfo> AddIncludesForConsumption(IQueryable<ScoreInfo> query)
|
protected override IQueryable<ScoreInfo> AddIncludesForConsumption(IQueryable<ScoreInfo> query)
|
||||||
=> base.AddIncludesForConsumption(query).Include(s => s.Files).ThenInclude(f => f.FileInfo);
|
=> base.AddIncludesForConsumption(query)
|
||||||
|
.Include(s => s.Files).ThenInclude(f => f.FileInfo)
|
||||||
|
.Include(s => s.BeatmapInfo)
|
||||||
|
.Include(s => s.Ruleset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user