-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-fetch status of any beatmaps stuck in qualified status #32455
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,8 +97,9 @@ public class RealmAccess : IDisposable | |
/// 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 @@ void remapKeyBinding(int oldAction, int newAction) | |
|
||
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); | ||
Comment on lines
+1255
to
+1256
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In testing this does appear to work perhaps too well because I expected this to delete the "qualified" badge from the set in song select if there is no saved user credentials (which will fail the online lookup in A new couple of weird idiosyncrasies to add to the pile I guess... |
||
break; | ||
} | ||
|
||
Logger.Log($"Migration completed in {stopwatch.ElapsedMilliseconds}ms"); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a 99.999999% confidence this will never again be called with
resetOnlineId: false
outside of the migration this PR is adding, and as such I would have just copied the logic across because I utterly detest boolean parameters like this that basically turn off some of the method, but I don't feel strongly enough about it to demand it changed