mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Merge branch 'master' into importer-returns-live
This commit is contained in:
@ -29,12 +29,13 @@ namespace osu.Game.Beatmaps
|
||||
/// Handles general operations related to global beatmap management.
|
||||
/// </summary>
|
||||
[ExcludeFromDynamicCompile]
|
||||
public class BeatmapManager : IModelDownloader<BeatmapSetInfo>, IModelManager<BeatmapSetInfo>, IModelFileManager<BeatmapSetInfo, BeatmapSetFileInfo>, ICanAcceptFiles, IWorkingBeatmapCache
|
||||
public class BeatmapManager : IModelDownloader<BeatmapSetInfo>, IModelManager<BeatmapSetInfo>, IModelFileManager<BeatmapSetInfo, BeatmapSetFileInfo>, ICanAcceptFiles, IWorkingBeatmapCache, IDisposable
|
||||
{
|
||||
private readonly BeatmapModelManager beatmapModelManager;
|
||||
private readonly BeatmapModelDownloader beatmapModelDownloader;
|
||||
|
||||
private readonly WorkingBeatmapCache workingBeatmapCache;
|
||||
private readonly BeatmapOnlineLookupQueue onlineBetamapLookupQueue;
|
||||
|
||||
public BeatmapManager(Storage storage, IDatabaseContextFactory contextFactory, RulesetStore rulesets, IAPIProvider api, [NotNull] AudioManager audioManager, IResourceStore<byte[]> resources, GameHost host = null,
|
||||
WorkingBeatmap defaultBeatmap = null, bool performOnlineLookups = false)
|
||||
@ -47,8 +48,8 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
if (performOnlineLookups)
|
||||
{
|
||||
var onlineBeatmapLookupCache = new BeatmapOnlineLookupQueue(api, storage);
|
||||
beatmapModelManager.PopulateOnlineInformation = onlineBeatmapLookupCache.UpdateAsync;
|
||||
onlineBetamapLookupQueue = new BeatmapOnlineLookupQueue(api, storage);
|
||||
beatmapModelManager.OnlineLookupQueue = onlineBetamapLookupQueue;
|
||||
}
|
||||
}
|
||||
|
||||
@ -324,5 +325,14 @@ namespace osu.Game.Beatmaps
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Implementation of IDisposable
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
onlineBetamapLookupQueue?.Dispose();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user