From 2d0f4d38598c3fbbd05f6423298d36f6a1bbb830 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 25 Oct 2017 19:26:46 +0900 Subject: [PATCH] Fix OnlineBeatmapSetID not being correctly populated --- osu.Game/Beatmaps/BeatmapMetadata.cs | 1 + osu.Game/Online/API/Requests/GetBeatmapSetsResponse.cs | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/osu.Game/Beatmaps/BeatmapMetadata.cs b/osu.Game/Beatmaps/BeatmapMetadata.cs index 747ffd0a40..89f9ebf47a 100644 --- a/osu.Game/Beatmaps/BeatmapMetadata.cs +++ b/osu.Game/Beatmaps/BeatmapMetadata.cs @@ -17,6 +17,7 @@ namespace osu.Game.Beatmaps private int? onlineBeatmapSetID; [NotMapped] + [JsonProperty(@"id")] public int? OnlineBeatmapSetID { get { return onlineBeatmapSetID; } diff --git a/osu.Game/Online/API/Requests/GetBeatmapSetsResponse.cs b/osu.Game/Online/API/Requests/GetBeatmapSetsResponse.cs index b3bdab2616..f2ca0c1a2f 100644 --- a/osu.Game/Online/API/Requests/GetBeatmapSetsResponse.cs +++ b/osu.Game/Online/API/Requests/GetBeatmapSetsResponse.cs @@ -9,7 +9,7 @@ using osu.Game.Rulesets; namespace osu.Game.Online.API.Requests { - public class GetBeatmapSetsResponse : BeatmapMetadata + public class GetBeatmapSetsResponse : BeatmapMetadata // todo: this is a bit wrong... { [JsonProperty(@"covers")] private BeatmapSetOnlineCovers covers { get; set; } @@ -23,9 +23,6 @@ namespace osu.Game.Online.API.Requests [JsonProperty(@"favourite_count")] private int favouriteCount { get; set; } - [JsonProperty(@"id")] - private int onlineId { get; set; } - [JsonProperty(@"user_id")] private long creatorId { set { Author.Id = value; } @@ -38,7 +35,7 @@ namespace osu.Game.Online.API.Requests { return new BeatmapSetInfo { - OnlineBeatmapSetID = onlineId, + OnlineBeatmapSetID = OnlineBeatmapSetID, Metadata = this, OnlineInfo = new BeatmapSetOnlineInfo {