2021-09-30 17:21:16 +08:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
using osu.Framework.Platform;
|
|
|
|
using osu.Game.Database;
|
|
|
|
using osu.Game.Online.API;
|
|
|
|
using osu.Game.Online.API.Requests;
|
|
|
|
|
|
|
|
namespace osu.Game.Beatmaps
|
|
|
|
{
|
|
|
|
public class BeatmapModelDownloader : ModelDownloader<BeatmapSetInfo>
|
|
|
|
{
|
|
|
|
protected override ArchiveDownloadRequest<BeatmapSetInfo> CreateDownloadRequest(BeatmapSetInfo set, bool minimiseDownloadSize) =>
|
|
|
|
new DownloadBeatmapSetRequest(set, minimiseDownloadSize);
|
|
|
|
|
2021-10-27 19:02:51 +08:00
|
|
|
public override ArchiveDownloadRequest<BeatmapSetInfo> GetExistingDownload(BeatmapSetInfo model)
|
|
|
|
=> CurrentDownloads.Find(r => r.Model.OnlineID == model.OnlineID);
|
|
|
|
|
2021-10-07 16:01:37 +08:00
|
|
|
public BeatmapModelDownloader(IBeatmapModelManager beatmapModelManager, IAPIProvider api, GameHost host = null)
|
2021-09-30 17:21:16 +08:00
|
|
|
: base(beatmapModelManager, api, host)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|