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:
parent
06d4b323d1
commit
eb46c9ce9b
@ -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