compare metdata and remove duplicate from beatmap to prevent redundant storage

This commit is contained in:
Aergwyn
2017-11-23 19:46:58 +01:00
parent 0df5432f5e
commit e3a230320a
2 changed files with 22 additions and 0 deletions

View File

@ -515,6 +515,10 @@ namespace osu.Game.Beatmaps
if (existing == null)
{
// Exclude beatmap-metadata if it's equal to beatmapset-metadata
if (metadata.Equals(beatmap.Metadata))
beatmap.BeatmapInfo.Metadata = null;
RulesetInfo ruleset = rulesets.GetRuleset(beatmap.BeatmapInfo.RulesetID);
// TODO: this should be done in a better place once we actually need to dynamically update it.