1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 16:12:57 +08:00

Fix metadata lost in beatmapset deserialisation

This commit is contained in:
smoogipoo 2020-12-21 17:11:30 +09:00
parent 06d4b323d1
commit eb46c9ce9b

View File

@ -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;
}
}
}