mirror of
https://github.com/ppy/osu.git
synced 2026-05-18 04:19:53 +08:00
Merge pull request #32455 from peppy/reset-qualified-statuses
Re-fetch status of any beatmaps stuck in qualified status
This commit is contained in:
@@ -125,9 +125,10 @@ namespace osu.Game.Beatmaps
|
||||
/// <summary>
|
||||
/// Reset any fetched online linking information (and history).
|
||||
/// </summary>
|
||||
public void ResetOnlineInfo()
|
||||
public void ResetOnlineInfo(bool resetOnlineId = true)
|
||||
{
|
||||
OnlineID = -1;
|
||||
if (resetOnlineId)
|
||||
OnlineID = -1;
|
||||
LastOnlineUpdate = null;
|
||||
OnlineMD5Hash = string.Empty;
|
||||
if (Status != BeatmapOnlineStatus.LocallyModified)
|
||||
|
||||
@@ -97,8 +97,9 @@ namespace osu.Game.Database
|
||||
/// 45 2024-12-23 Change beat snap divisor adjust defaults to be Ctrl+Scroll instead of Ctrl+Shift+Scroll, if not already changed by user.
|
||||
/// 46 2024-12-26 Change beat snap divisor bindings to match stable directionality ¯\_(ツ)_/¯.
|
||||
/// 47 2025-01-21 Remove right mouse button binding for absolute scroll. Never use mouse buttons (or scroll) for global actions.
|
||||
/// 48 2025-03-19 Clear online status for all qualified beatmaps (some were stuck in a qualified state due to local caching issues).
|
||||
/// </summary>
|
||||
private const int schema_version = 47;
|
||||
private const int schema_version = 48;
|
||||
|
||||
/// <summary>
|
||||
/// Lock object which is held during <see cref="BlockAllOperations"/> sections, blocking realm retrieval during blocking periods.
|
||||
@@ -1245,6 +1246,15 @@ namespace osu.Game.Database
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 48:
|
||||
const int qualified = (int)BeatmapOnlineStatus.Qualified;
|
||||
|
||||
var beatmaps = migration.NewRealm.All<BeatmapInfo>().Where(b => b.StatusInt == qualified);
|
||||
|
||||
foreach (var beatmap in beatmaps)
|
||||
beatmap.ResetOnlineInfo(resetOnlineId: false);
|
||||
break;
|
||||
}
|
||||
|
||||
Logger.Log($"Migration completed in {stopwatch.ElapsedMilliseconds}ms");
|
||||
|
||||
Reference in New Issue
Block a user