1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 11:42:54 +08:00

Fix rank background processing not working (and not bumping score version)

This commit is contained in:
Bartłomiej Dach 2024-01-22 21:34:28 +01:00
parent 24be6d92ce
commit fdd499a485
No known key found for this signature in database

View File

@ -383,6 +383,7 @@ namespace osu.Game.Database
HashSet<Guid> scoreIds = realmAccess.Run(r => new HashSet<Guid>(
r.All<ScoreInfo>()
.Where(s => s.TotalScoreVersion < LegacyScoreEncoder.LATEST_VERSION)
.AsEnumerable() // need to materialise here as realm cannot support `.Select()`.
.Select(s => s.ID)));
Logger.Log($"Found {scoreIds.Count} scores which require rank upgrades.");
@ -412,6 +413,7 @@ namespace osu.Game.Database
{
ScoreInfo s = r.Find<ScoreInfo>(id)!;
s.Rank = StandardisedScoreMigrationTools.ComputeRank(s);
s.TotalScoreVersion = LegacyScoreEncoder.LATEST_VERSION;
});
++processedCount;