1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 01:42:55 +08:00

Fix lookups by beatmapinfo failing for imports of existing sores

This commit is contained in:
smoogipoo 2018-11-28 20:41:48 +09:00
parent a88b69ec43
commit d2f0a921ca
2 changed files with 8 additions and 3 deletions

View File

@ -267,7 +267,9 @@ namespace osu.Game
return;
}
if (scoreInfo.BeatmapInfo == null)
var databasedBeatmap = BeatmapManager.QueryBeatmap(b => b.ID == scoreInfo.BeatmapInfo.ID);
if (databasedBeatmap == null)
{
notifications.Post(new SimpleNotification
{
@ -279,7 +281,7 @@ namespace osu.Game
ruleset.Value = scoreInfo.Ruleset;
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(scoreInfo.BeatmapInfo);
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(databasedBeatmap);
Beatmap.Value.Mods.Value = scoreInfo.Mods;
menu.Push(new PlayerLoader(new ReplayPlayer(ScoreManager.GetScore(scoreInfo).Replay)));

View File

@ -16,6 +16,9 @@ namespace osu.Game.Scoring
}
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);
}
}