mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 19:22:54 +08:00
Remove logging and catch any kind of errors
This commit is contained in:
parent
d19f8997fc
commit
0e9576acfb
@ -944,13 +944,20 @@ namespace osu.Game.Database
|
||||
foreach (var score in scores)
|
||||
{
|
||||
// Recalculate the old-style standardised score to see if this was an old lazer score.
|
||||
long oldStandardised = StandardisedScoreMigrationTools.GetOldStandardised(score);
|
||||
bool oldScoreMatchesExpectations = StandardisedScoreMigrationTools.GetOldStandardised(score) == score.TotalScore;
|
||||
// Some older score don't have correct statistics populated, so let's give them benefit of doubt.
|
||||
bool scoreIsVeryOld = score.Date < new DateTime(2023, 1, 1, 0, 0, 0);
|
||||
|
||||
if (oldStandardised == score.TotalScore)
|
||||
if (oldScoreMatchesExpectations || scoreIsVeryOld)
|
||||
{
|
||||
long calculatedNew = StandardisedScoreMigrationTools.GetNewStandardised(score);
|
||||
Logger.Log($"Converting score {score.Rank} {score.Accuracy:P1} {score.TotalScore} -> {calculatedNew}");
|
||||
score.TotalScore = calculatedNew;
|
||||
try
|
||||
{
|
||||
long calculatedNew = StandardisedScoreMigrationTools.GetNewStandardised(score);
|
||||
score.TotalScore = calculatedNew;
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user