mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Add flow for bypassing local cache lookups when refreshing beatmap metadata
This commit is contained in:
@ -48,15 +48,15 @@ namespace osu.Game.Beatmaps
|
||||
prepareLocalCache();
|
||||
}
|
||||
|
||||
public void Update(BeatmapSetInfo beatmapSet)
|
||||
public void Update(BeatmapSetInfo beatmapSet, bool forceOnlineFetch)
|
||||
{
|
||||
foreach (var b in beatmapSet.Beatmaps)
|
||||
lookup(beatmapSet, b);
|
||||
lookup(beatmapSet, b, forceOnlineFetch);
|
||||
}
|
||||
|
||||
private void lookup(BeatmapSetInfo set, BeatmapInfo beatmapInfo)
|
||||
private void lookup(BeatmapSetInfo set, BeatmapInfo beatmapInfo, bool forceOnlineFetch)
|
||||
{
|
||||
if (checkLocalCache(set, beatmapInfo))
|
||||
if (!forceOnlineFetch && checkLocalCache(set, beatmapInfo))
|
||||
return;
|
||||
|
||||
if (api?.State.Value != APIState.Online)
|
||||
|
Reference in New Issue
Block a user