2021-09-30 09:21:16 +00: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
|
|
|
|
{
|
2021-11-05 08:37:05 +00:00
|
|
|
public class BeatmapModelDownloader : ModelDownloader<BeatmapSetInfo, IBeatmapSetInfo>
|
2021-09-30 09:21:16 +00:00
|
|
|
{
|
2021-11-05 08:37:05 +00:00
|
|
|
protected override ArchiveDownloadRequest<IBeatmapSetInfo> CreateDownloadRequest(IBeatmapSetInfo set, bool minimiseDownloadSize) =>
|
2021-09-30 09:21:16 +00:00
|
|
|
new DownloadBeatmapSetRequest(set, minimiseDownloadSize);
|
|
|
|
|
2021-11-05 08:37:05 +00:00
|
|
|
public override ArchiveDownloadRequest<IBeatmapSetInfo> GetExistingDownload(IBeatmapSetInfo model)
|
2021-10-27 11:02:51 +00:00
|
|
|
=> CurrentDownloads.Find(r => r.Model.OnlineID == model.OnlineID);
|
|
|
|
|
2021-11-05 07:46:40 +00:00
|
|
|
public BeatmapModelDownloader(IModelImporter<BeatmapSetInfo> beatmapImporter, IAPIProvider api, GameHost host = null)
|
|
|
|
: base(beatmapImporter, api, host)
|
2021-09-30 09:21:16 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|