From ae306274be84be4c98aa38708596e79b08b54866 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 13 Nov 2022 18:36:17 -0800 Subject: [PATCH] New: Improve logging when processing files for import Closes #5226 --- .../EpisodeImport/Aggregation/AggregationService.cs | 4 +++- src/NzbDrone.Core/Tv/EpisodeService.cs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/MediaFiles/EpisodeImport/Aggregation/AggregationService.cs b/src/NzbDrone.Core/MediaFiles/EpisodeImport/Aggregation/AggregationService.cs index faa3aaea8..056079b04 100644 --- a/src/NzbDrone.Core/MediaFiles/EpisodeImport/Aggregation/AggregationService.cs +++ b/src/NzbDrone.Core/MediaFiles/EpisodeImport/Aggregation/AggregationService.cs @@ -69,7 +69,9 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Aggregation } catch (Exception ex) { - _logger.Warn(ex, ex.Message); + var message = $"Unable to augment information for file: '{localEpisode.Path}'. Series: {localEpisode.Series} Error: {ex.Message}"; + + _logger.Warn(ex, message); } } diff --git a/src/NzbDrone.Core/Tv/EpisodeService.cs b/src/NzbDrone.Core/Tv/EpisodeService.cs index 1cc3ae12b..2221ff452 100644 --- a/src/NzbDrone.Core/Tv/EpisodeService.cs +++ b/src/NzbDrone.Core/Tv/EpisodeService.cs @@ -269,7 +269,7 @@ namespace NzbDrone.Core.Tv return sortedEpisodes[part.Value - 1]; } - throw new InvalidOperationException("Multiple episodes with the same air date found"); + throw new InvalidOperationException($"Multiple episodes with the same air date found. Date: {date}"); } } }