mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:17:26 +08:00
Dedupe .osu files with same hash in same set
This commit is contained in:
parent
9f62ec869a
commit
12243aaa9a
@ -296,8 +296,13 @@ namespace osu.Game.Beatmaps
|
||||
var decoder = Decoder.GetDecoder<Beatmap>(sr);
|
||||
IBeatmap beatmap = decoder.Decode(sr);
|
||||
|
||||
string hash = ms.ComputeSHA2Hash();
|
||||
|
||||
if (beatmapInfos.Any(b => b.Hash == hash))
|
||||
continue;
|
||||
|
||||
beatmap.BeatmapInfo.Path = file.Filename;
|
||||
beatmap.BeatmapInfo.Hash = ms.ComputeSHA2Hash();
|
||||
beatmap.BeatmapInfo.Hash = hash;
|
||||
beatmap.BeatmapInfo.MD5Hash = ms.ComputeMD5Hash();
|
||||
|
||||
var ruleset = rulesets.GetRuleset(beatmap.BeatmapInfo.RulesetID);
|
||||
|
Loading…
Reference in New Issue
Block a user