diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs index 2cb7e8b901..b7a08c068f 100644 --- a/osu.Game/Beatmaps/BeatmapManager.cs +++ b/osu.Game/Beatmaps/BeatmapManager.cs @@ -78,7 +78,8 @@ namespace osu.Game.Beatmaps updateQueue = new BeatmapUpdateQueue(api); } - protected override ArchiveDownloadRequest CreateDownloadRequest(BeatmapSetInfo set, object[] options) => new DownloadBeatmapSetRequest(set, (options?.FirstOrDefault() as bool?) ?? false); + protected override ArchiveDownloadRequest CreateDownloadRequest(BeatmapSetInfo set, bool minimiseDownloadSize) => + new DownloadBeatmapSetRequest(set, minimiseDownloadSize); protected override Task Populate(BeatmapSetInfo beatmapSet, ArchiveReader archive, CancellationToken cancellationToken = default) { diff --git a/osu.Game/Database/DownloadableArchiveModelManager.cs b/osu.Game/Database/DownloadableArchiveModelManager.cs index fc50a4720a..d9ebd0c06a 100644 --- a/osu.Game/Database/DownloadableArchiveModelManager.cs +++ b/osu.Game/Database/DownloadableArchiveModelManager.cs @@ -42,30 +42,23 @@ namespace osu.Game.Database /// /// Creates the download request for this . - /// The parameters will be provided when the download was initiated with extra options meant - /// to be used in the creation of the request. /// /// The to be downloaded. - /// Extra parameters for request creation, null if none were passed. + /// Whether this download should be optimised for slow connections. Generally means extras are not included in the download bundle.. /// The request object. - protected abstract ArchiveDownloadRequest CreateDownloadRequest(TModel model, object[] options); + protected abstract ArchiveDownloadRequest CreateDownloadRequest(TModel model, bool minimiseDownloadSize); - public bool Download(TModel model) + /// + /// Begin a download for the requested . + /// + /// The to be downloaded. + /// Whether this download should be optimised for slow connections. Generally means extras are not included in the download bundle.. + /// Whether the download was started. + public bool Download(TModel model, bool minimiseDownloadSize = false) { if (!canDownload(model)) return false; - var request = CreateDownloadRequest(model, null); - - performDownloadWithRequest(request); - - return true; - } - - public bool Download(TModel model, params object[] extra) - { - if (!canDownload(model)) return false; - - var request = CreateDownloadRequest(model, extra); + var request = CreateDownloadRequest(model, minimiseDownloadSize); performDownloadWithRequest(request); diff --git a/osu.Game/Database/IModelDownloader.cs b/osu.Game/Database/IModelDownloader.cs index b4df7cc0e3..f6f4b0aa42 100644 --- a/osu.Game/Database/IModelDownloader.cs +++ b/osu.Game/Database/IModelDownloader.cs @@ -31,21 +31,12 @@ namespace osu.Game.Database bool IsAvailableLocally(TModel model); /// - /// Downloads a . - /// This may post notifications tracking progress. + /// Begin a download for the requested . /// /// The to be downloaded. - /// Whether downloading can happen. - bool Download(TModel model); - - /// - /// Downloads a with optional parameters for the download request. - /// This may post notifications tracking progress. - /// - /// The to be downloaded. - /// Optional parameters to be used for creating the download request. - /// Whether downloading can happen. - bool Download(TModel model, params object[] extra); + /// Whether this download should be optimised for slow connections. Generally means extras are not included in the download bundle.. + /// Whether the download was started. + bool Download(TModel model, bool minimiseDownloadSize); /// /// Gets an existing download request if it exists.