1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-03 22:14:57 +08:00

Merge pull request #34882 from peppy/fix-excess-requests-song-select

Fix excess requests leading to queueing / delays of updating metadata at song select
This commit is contained in:
Bartłomiej Dach
2025-09-01 11:49:32 +02:00
committed by GitHub
Unverified
2 changed files with 3 additions and 1 deletions
@@ -43,6 +43,8 @@ namespace osu.Game.Screens.SelectV2
var request = new GetBeatmapSetRequest(id);
var tcs = new TaskCompletionSource<APIBeatmapSet?>();
token.Register(() => request.Cancel());
// async request success callback is a bit of a dangerous game, but there's some reasoning for it.
// - don't really want to use `IAPIAccess.PerformAsync()` because we still want to respect request queueing & online status checks
// - we want the realm write here to be async because it is known to be slow for some users with large beatmap collections
+1 -1
View File
@@ -1011,7 +1011,7 @@ namespace osu.Game.Screens.SelectV2
lastLookupResult.Value = BeatmapSetLookupResult.InProgress();
onlineLookupCancellation = new CancellationTokenSource();
currentOnlineLookup = onlineLookupSource.GetBeatmapSetAsync(beatmapSetInfo.OnlineID);
currentOnlineLookup = onlineLookupSource.GetBeatmapSetAsync(beatmapSetInfo.OnlineID, onlineLookupCancellation.Token);
currentOnlineLookup.ContinueWith(t =>
{
if (t.IsCompletedSuccessfully)