mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:12:54 +08:00
99d5ff9efb
This API endpoint is intended for usage with the entire `solo_scores` machinery and ID schema, rather than the legacy `*_scores_high` ID schema. It also supports automagically falling back to downloading legacy replays if a stable-imported score is requested for download (internally this happens via `legacy_score_id` in the `data` json). This change will allow replays to be downloaded, but it will still not yield 100% correct behaviour, as there is further work to be done in that respect. The download tracker is expecting score hashes to arrive from web to verify the integrity of the incoming download, but the API does not expose such a facility right now; we will have to decide as to whether we want to add one web-side, or whether we want to disable the checking client-side.
20 lines
553 B
C#
20 lines
553 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.
|
|
|
|
using osu.Game.Scoring;
|
|
|
|
namespace osu.Game.Online.API.Requests
|
|
{
|
|
public class DownloadReplayRequest : ArchiveDownloadRequest<IScoreInfo>
|
|
{
|
|
public DownloadReplayRequest(IScoreInfo score)
|
|
: base(score)
|
|
{
|
|
}
|
|
|
|
protected override string FileExtension => ".osr";
|
|
|
|
protected override string Target => $@"scores/{Model.OnlineID}/download";
|
|
}
|
|
}
|