mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 21:43:22 +08:00
Add back optional online lookups
This commit is contained in:
parent
90225f2082
commit
7a72747d88
@ -42,9 +42,11 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
workingBeatmapCache.BeatmapManager = beatmapModelManager;
|
workingBeatmapCache.BeatmapManager = beatmapModelManager;
|
||||||
|
|
||||||
var onlineBeatmapLookupCache = new BeatmapOnlineLookupQueue(api, storage);
|
if (performOnlineLookups)
|
||||||
|
{
|
||||||
beatmapModelManager.PopulateOnlineInformation = onlineBeatmapLookupCache.UpdateAsync;
|
var onlineBeatmapLookupCache = new BeatmapOnlineLookupQueue(api, storage);
|
||||||
|
beatmapModelManager.PopulateOnlineInformation = onlineBeatmapLookupCache.UpdateAsync;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual WorkingBeatmapCache CreateWorkingBeatmapCache(AudioManager audioManager, IResourceStore<byte[]> resources, IResourceStore<byte[]> storage, WorkingBeatmap defaultBeatmap, GameHost host) =>
|
protected virtual WorkingBeatmapCache CreateWorkingBeatmapCache(AudioManager audioManager, IResourceStore<byte[]> resources, IResourceStore<byte[]> storage, WorkingBeatmap defaultBeatmap, GameHost host) =>
|
||||||
|
@ -242,7 +242,7 @@ namespace osu.Game
|
|||||||
|
|
||||||
// ordering is important here to ensure foreign keys rules are not broken in ModelStore.Cleanup()
|
// ordering is important here to ensure foreign keys rules are not broken in ModelStore.Cleanup()
|
||||||
dependencies.Cache(ScoreManager = new ScoreManager(RulesetStore, () => BeatmapManager, Storage, API, contextFactory, Scheduler, Host, () => difficultyCache, LocalConfig));
|
dependencies.Cache(ScoreManager = new ScoreManager(RulesetStore, () => BeatmapManager, Storage, API, contextFactory, Scheduler, Host, () => difficultyCache, LocalConfig));
|
||||||
dependencies.Cache(BeatmapManager = new BeatmapManager(Storage, contextFactory, RulesetStore, API, Audio, Resources, Host, defaultBeatmap));
|
dependencies.Cache(BeatmapManager = new BeatmapManager(Storage, contextFactory, RulesetStore, API, Audio, Resources, Host, defaultBeatmap, performOnlineLookups: true));
|
||||||
|
|
||||||
// this should likely be moved to ArchiveModelManager when another case appears where it is necessary
|
// this should likely be moved to ArchiveModelManager when another case appears where it is necessary
|
||||||
// to have inter-dependent model managers. this could be obtained with an IHasForeign<T> interface to
|
// to have inter-dependent model managers. this could be obtained with an IHasForeign<T> interface to
|
||||||
|
Loading…
Reference in New Issue
Block a user