1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 17:27:39 +08:00
osu-lazer/osu.Game/Online/API/Requests/DownloadBeatmapSetRequest.cs

25 lines
751 B
C#
Raw Normal View History

// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Beatmaps;
using System;
namespace osu.Game.Online.API.Requests
{
public class DownloadBeatmapSetRequest : APIDownloadRequest
{
2017-09-09 12:21:37 +08:00
public readonly BeatmapSetInfo BeatmapSet;
public Action<float> DownloadProgressed;
2017-09-09 12:21:37 +08:00
public DownloadBeatmapSetRequest(BeatmapSetInfo set)
{
2017-09-09 12:21:37 +08:00
BeatmapSet = set;
Progress += (current, total) => DownloadProgressed?.Invoke((float) current / total);
}
2017-09-09 12:21:37 +08:00
protected override string Target => $@"beatmapsets/{BeatmapSet.OnlineBeatmapSetID}/download";
}
}