1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 08:43:20 +08:00

Merge pull request #16652 from peppy/skip-beatmaps-missing-ruleset

This commit is contained in:
Salman Ahmed 2022-01-27 19:09:28 +03:00 committed by GitHub
commit 96f86d035d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -232,6 +232,7 @@ namespace osu.Game.Database
var transaction = r.BeginWrite();
int written = 0;
int missing = 0;
try
{
@ -261,6 +262,12 @@ namespace osu.Game.Database
var ruleset = r.Find<RulesetInfo>(beatmap.RulesetInfo.ShortName);
var metadata = getBestMetadata(beatmap.Metadata, beatmapSet.Metadata);
if (ruleset == null)
{
log($"Skipping {++missing} beatmaps with missing ruleset");
continue;
}
var realmBeatmap = new BeatmapInfo(ruleset, new BeatmapDifficulty(beatmap.BaseDifficulty), metadata)
{
DifficultyName = beatmap.DifficultyName,