mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 06:52:56 +08:00
Add Availability to BeatmapSetOnlineInfo
This commit is contained in:
parent
9a5d0695e9
commit
3fc604b60a
@ -65,6 +65,11 @@ namespace osu.Game.Beatmaps
|
||||
/// The amount of people who have favourited this beatmap set.
|
||||
/// </summary>
|
||||
public int FavouriteCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The availability of this beatmap set.
|
||||
/// </summary>
|
||||
public BeatmapSetOnlineAvailability Availability { get; set; }
|
||||
}
|
||||
|
||||
public class BeatmapSetOnlineCovers
|
||||
@ -84,4 +89,13 @@ namespace osu.Game.Beatmaps
|
||||
[JsonProperty(@"list@2x")]
|
||||
public string List { get; set; }
|
||||
}
|
||||
|
||||
public class BeatmapSetOnlineAvailability
|
||||
{
|
||||
[JsonProperty(@"download_disabled")]
|
||||
public bool DownloadDisabled { get; set; }
|
||||
|
||||
[JsonProperty(@"more_information")]
|
||||
public string ExternalLink { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -60,6 +60,12 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
set => Author.Id = value;
|
||||
}
|
||||
|
||||
[JsonProperty(@"availability")]
|
||||
private BeatmapSetOnlineAvailability availability { get; set; }
|
||||
|
||||
[JsonProperty(@"download_unavailable")]
|
||||
private bool test { get; set; }
|
||||
|
||||
[JsonProperty(@"beatmaps")]
|
||||
private IEnumerable<APIBeatmap> beatmaps { get; set; }
|
||||
|
||||
@ -83,6 +89,7 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
Submitted = submitted,
|
||||
Ranked = ranked,
|
||||
LastUpdated = lastUpdated,
|
||||
Availability = availability,
|
||||
},
|
||||
Beatmaps = beatmaps?.Select(b => b.ToBeatmap(rulesets)).ToList(),
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user