mirror of
https://github.com/ppy/osu
synced 2025-03-05 02:49:30 +00:00
Merge pull request #11235 from smoogipoo/fix-apibeatmapset-deserialisation
Fix metadata lost in beatmapset deserialisation
This commit is contained in:
commit
3e3d5b2e37
@ -80,7 +80,7 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
|
||||
public BeatmapSetInfo ToBeatmapSet(RulesetStore rulesets)
|
||||
{
|
||||
return new BeatmapSetInfo
|
||||
var beatmapSet = new BeatmapSetInfo
|
||||
{
|
||||
OnlineBeatmapSetID = OnlineBeatmapSetID,
|
||||
Metadata = this,
|
||||
@ -104,8 +104,17 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
Genre = genre,
|
||||
Language = language
|
||||
},
|
||||
Beatmaps = beatmaps?.Select(b => b.ToBeatmap(rulesets)).ToList(),
|
||||
};
|
||||
|
||||
beatmapSet.Beatmaps = beatmaps?.Select(b =>
|
||||
{
|
||||
var beatmap = b.ToBeatmap(rulesets);
|
||||
beatmap.BeatmapSet = beatmapSet;
|
||||
beatmap.Metadata = beatmapSet.Metadata;
|
||||
return beatmap;
|
||||
}).ToList();
|
||||
|
||||
return beatmapSet;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user