Revert "Remove comparison of online beatmap IDs during dedupe checks"

This reverts commit 15af28d2a0.
This commit is contained in:
Dean Herbert
2021-06-28 09:54:18 +09:00
parent e755dcc34d
commit 9a96cd4a1d
3 changed files with 49 additions and 2 deletions

View File

@ -411,7 +411,7 @@ namespace osu.Game.Database
if (existing != null)
{
if (canReuseExisting(existing, item))
if (CanReuseExisting(existing, item))
{
Undelete(existing);
LogForModel(item, $"Found existing {HumanisedModelName} for {item} (ID {existing.ID}) skipping import.");
@ -808,7 +808,7 @@ namespace osu.Game.Database
/// <param name="existing">The existing model.</param>
/// <param name="import">The newly imported model.</param>
/// <returns>Whether the existing model should be restored and used. Returning false will delete the existing and force a re-import.</returns>
private bool canReuseExisting(TModel existing, TModel import) =>
protected virtual bool CanReuseExisting(TModel existing, TModel import) =>
// for the best or worst, we copy and import files of a new import before checking whether
// it is a duplicate. so to check if anything has changed, we can just compare all FileInfo IDs.
getIDs(existing.Files).SequenceEqual(getIDs(import.Files)) &&