mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09:00
set Beatmap.BeatmapSet
to BeatmapSet
property in SoloScoreInfo
This commit is contained in:
@ -4,6 +4,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Converters;
|
using Newtonsoft.Json.Converters;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
@ -86,7 +87,19 @@ namespace osu.Game.Online.API.Requests.Responses
|
|||||||
public APIBeatmap? Beatmap { get; set; }
|
public APIBeatmap? Beatmap { get; set; }
|
||||||
|
|
||||||
[JsonProperty("beatmapset")]
|
[JsonProperty("beatmapset")]
|
||||||
public APIBeatmapSet? BeatmapSet { get; set; }
|
[CanBeNull]
|
||||||
|
public APIBeatmapSet BeatmapSet
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
// in the deserialisation case we need to ferry this data across.
|
||||||
|
// the order of properties returned by the API guarantees that the beatmap is populated by this point.
|
||||||
|
if (!(Beatmap is APIBeatmap apiBeatmap))
|
||||||
|
throw new InvalidOperationException("Beatmap set metadata arrived before beatmap metadata in response");
|
||||||
|
|
||||||
|
apiBeatmap.BeatmapSet = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[JsonProperty("pp")]
|
[JsonProperty("pp")]
|
||||||
public double? PP { get; set; }
|
public double? PP { get; set; }
|
||||||
|
Reference in New Issue
Block a user