mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 12:13:22 +08:00
Fix inability to serialise-then-deserialise playlist items
This commit is contained in:
parent
646f5f0f33
commit
77289c7224
@ -61,7 +61,13 @@ namespace osu.Game.Online.Rooms
|
|||||||
/// Used for serialising to the API.
|
/// Used for serialising to the API.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("beatmap_id")]
|
[JsonProperty("beatmap_id")]
|
||||||
private int onlineBeatmapId => Beatmap.OnlineID;
|
private int onlineBeatmapId
|
||||||
|
{
|
||||||
|
get => Beatmap.OnlineID;
|
||||||
|
// This setter is only required for client-side serialise-then-deserialise operations.
|
||||||
|
// Serialisation is supposed to emit only a `beatmap_id`, but a (non-null) `beatmap` is required on deserialise.
|
||||||
|
set => Beatmap = new APIBeatmap { OnlineID = value };
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A beatmap representing this playlist item.
|
/// A beatmap representing this playlist item.
|
||||||
|
Loading…
Reference in New Issue
Block a user