Run score conversion for previously-imported scores

This commit is contained in:
Bartłomiej Dach 2023-12-18 22:23:58 +01:00
parent 017003deea
commit 9c8df4e6d1
No known key found for this signature in database
3 changed files with 5 additions and 3 deletions

View File

@ -127,8 +127,11 @@ public void TestDifficultyProcessingWhilePlaying()
});
}
[TestCase(30000001)]
[TestCase(30000002)]
[TestCase(30000003)]
[TestCase(30000004)]
[TestCase(30000005)]
public void TestScoreUpgradeSuccess(int scoreVersion)
{
ScoreInfo scoreInfo = null!;

View File

@ -316,8 +316,7 @@ private void convertLegacyTotalScoreToStandardised()
HashSet<Guid> scoreIds = realmAccess.Run(r => new HashSet<Guid>(r.All<ScoreInfo>()
.Where(s => !s.BackgroundReprocessingFailed && s.BeatmapInfo != null
&& (s.TotalScoreVersion == 30000002
|| s.TotalScoreVersion == 30000003))
&& s.TotalScoreVersion < LegacyScoreEncoder.LATEST_VERSION)
.AsEnumerable().Select(s => s.ID)));
Logger.Log($"Found {scoreIds.Count} scores which require total score conversion.");

View File

@ -26,7 +26,7 @@ public static bool ShouldMigrateToNewStandardised(ScoreInfo score)
if (score.IsLegacyScore)
return false;
if (score.TotalScoreVersion > 30000004)
if (score.TotalScoreVersion > 30000005)
return false;
// Recalculate the old-style standardised score to see if this was an old lazer score.