mirror of
https://github.com/ppy/osu.git
synced 2025-01-08 03:12:57 +08:00
Only drop online set ID if beatmap IDs were stripped in online retrieval
This commit is contained in:
parent
7ecce713bb
commit
f71c8cb30f
@ -103,11 +103,19 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
validateOnlineIds(beatmapSet);
|
validateOnlineIds(beatmapSet);
|
||||||
|
|
||||||
|
bool hadOnlineBeatmapIDs = beatmapSet.Beatmaps.Any(b => b.OnlineBeatmapID > 0);
|
||||||
|
|
||||||
await updateQueue.UpdateAsync(beatmapSet, cancellationToken);
|
await updateQueue.UpdateAsync(beatmapSet, cancellationToken);
|
||||||
|
|
||||||
// ensure at least one beatmap was able to retrieve an online ID, else drop the set ID.
|
// ensure at least one beatmap was able to retrieve or keep an online ID, else drop the set ID.
|
||||||
if (!beatmapSet.Beatmaps.Any(b => b.OnlineBeatmapID > 0))
|
if (hadOnlineBeatmapIDs && !beatmapSet.Beatmaps.Any(b => b.OnlineBeatmapID > 0))
|
||||||
beatmapSet.OnlineBeatmapSetID = null;
|
{
|
||||||
|
if (beatmapSet.OnlineBeatmapSetID != null)
|
||||||
|
{
|
||||||
|
beatmapSet.OnlineBeatmapSetID = null;
|
||||||
|
LogForModel(beatmapSet, "Disassociating beatmap set ID due to loss of all beatmap IDs");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PreImport(BeatmapSetInfo beatmapSet)
|
protected override void PreImport(BeatmapSetInfo beatmapSet)
|
||||||
|
Loading…
Reference in New Issue
Block a user