mirror of
https://github.com/osukey/osukey.git
synced 2025-05-23 14:37:39 +09:00
Fix track transfer not running when beatmap is retrieved from cache
This commit is contained in:
parent
ffc3c9f8f6
commit
16c993579b
@ -180,19 +180,18 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
lock (workingCache)
|
lock (workingCache)
|
||||||
{
|
{
|
||||||
var cached = workingCache.FirstOrDefault(w => w.BeatmapInfo?.ID == beatmapInfo.ID);
|
var working = workingCache.FirstOrDefault(w => w.BeatmapInfo?.ID == beatmapInfo.ID);
|
||||||
|
|
||||||
if (cached != null)
|
if (working == null)
|
||||||
return cached;
|
{
|
||||||
|
if (beatmapInfo.Metadata == null)
|
||||||
|
beatmapInfo.Metadata = beatmapInfo.BeatmapSet.Metadata;
|
||||||
|
|
||||||
if (beatmapInfo.Metadata == null)
|
workingCache.Add(working = new BeatmapManagerWorkingBeatmap(Files.Store,
|
||||||
beatmapInfo.Metadata = beatmapInfo.BeatmapSet.Metadata;
|
new LargeTextureStore(host?.CreateTextureLoaderStore(Files.Store)), beatmapInfo, audioManager));
|
||||||
|
}
|
||||||
WorkingBeatmap working = new BeatmapManagerWorkingBeatmap(Files.Store, new LargeTextureStore(host?.CreateTextureLoaderStore(Files.Store)), beatmapInfo, audioManager);
|
|
||||||
|
|
||||||
previous?.TransferTo(working);
|
previous?.TransferTo(working);
|
||||||
workingCache.Add(working);
|
|
||||||
|
|
||||||
return working;
|
return working;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user