mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 10:17:19 +08: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)
|
public BeatmapSetInfo ToBeatmapSet(RulesetStore rulesets)
|
||||||
{
|
{
|
||||||
return new BeatmapSetInfo
|
var beatmapSet = new BeatmapSetInfo
|
||||||
{
|
{
|
||||||
OnlineBeatmapSetID = OnlineBeatmapSetID,
|
OnlineBeatmapSetID = OnlineBeatmapSetID,
|
||||||
Metadata = this,
|
Metadata = this,
|
||||||
@ -104,8 +104,17 @@ namespace osu.Game.Online.API.Requests.Responses
|
|||||||
Genre = genre,
|
Genre = genre,
|
||||||
Language = language
|
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…
x
Reference in New Issue
Block a user