diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs index 36fde8a319..b7bece9492 100644 --- a/osu.Game/Beatmaps/BeatmapManager.cs +++ b/osu.Game/Beatmaps/BeatmapManager.cs @@ -107,6 +107,7 @@ namespace osu.Game.Beatmaps { Delete(existingOnlineId); beatmaps.PurgeDeletable(s => s.ID == existingOnlineId.ID); + Logger.Log($"Found existing beatmap set with same OnlineBeatmapSetID ({model.OnlineBeatmapSetID}). It has been purged.", LoggingTarget.Database); } } @@ -303,7 +304,7 @@ namespace osu.Game.Beatmaps { // let's make sure there are actually .osu files to import. string mapName = reader.Filenames.FirstOrDefault(f => f.EndsWith(".osu")); - if (string.IsNullOrEmpty(mapName)) throw new InvalidOperationException("No beatmap files found in the map folder."); + if (string.IsNullOrEmpty(mapName)) throw new InvalidOperationException("No beatmap files found in this beatmap archive."); BeatmapMetadata metadata; using (var stream = new StreamReader(reader.GetStream(mapName))) diff --git a/osu.Game/Database/ArchiveModelManager.cs b/osu.Game/Database/ArchiveModelManager.cs index 99f1e9f581..74c7b3df5d 100644 --- a/osu.Game/Database/ArchiveModelManager.cs +++ b/osu.Game/Database/ArchiveModelManager.cs @@ -190,7 +190,11 @@ namespace osu.Game.Database var existing = CheckForExisting(item); - if (existing != null) return existing; + if (existing != null) + { + Logger.Log($"Found existing {typeof(TModel)} for {archive.Name} (ID {existing.ID}). Skipping import.", LoggingTarget.Database); + return existing; + } item.Files = createFileInfos(archive, Files); @@ -205,9 +209,12 @@ namespace osu.Game.Database throw; } } + + Logger.Log($"Import of {archive.Name} successfully completed!", LoggingTarget.Database); } catch { + Logger.Log($"Import of {archive.Name} failed and has been rolled back.", LoggingTarget.Database); item = null; }