mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 23:12:56 +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.
|
||||
/// </summary>
|
||||
[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>
|
||||
/// A beatmap representing this playlist item.
|
||||
|
Loading…
Reference in New Issue
Block a user