mirror of
https://github.com/ppy/osu.git
synced 2024-12-21 16:33:21 +08:00
26 lines
895 B
C#
26 lines
895 B
C#
// 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.
|
|
|
|
#nullable disable
|
|
|
|
using osu.Game.Database;
|
|
using osu.Game.Extensions;
|
|
using osu.Game.Online.API;
|
|
using osu.Game.Online.API.Requests;
|
|
|
|
namespace osu.Game.Scoring
|
|
{
|
|
public class ScoreModelDownloader : ModelDownloader<ScoreInfo, IScoreInfo>
|
|
{
|
|
public ScoreModelDownloader(IModelImporter<ScoreInfo> scoreManager, IAPIProvider api)
|
|
: base(scoreManager, api)
|
|
{
|
|
}
|
|
|
|
protected override ArchiveDownloadRequest<IScoreInfo> CreateDownloadRequest(IScoreInfo score, bool minimiseDownload) => new DownloadReplayRequest(score);
|
|
|
|
public override ArchiveDownloadRequest<IScoreInfo> GetExistingDownload(IScoreInfo model)
|
|
=> CurrentDownloads.Find(r => r.Model.MatchesOnlineID(model));
|
|
}
|
|
}
|