From f0c90a4744fe9f1154400b9f2a63c7cf5a636131 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 7 Oct 2019 09:40:26 -0700 Subject: [PATCH] Fixed: Log matching scene mapping for title --- .../DataAugmentation/Scene/SceneMappingService.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/DataAugmentation/Scene/SceneMappingService.cs b/src/NzbDrone.Core/DataAugmentation/Scene/SceneMappingService.cs index f1adebf26..72739009f 100644 --- a/src/NzbDrone.Core/DataAugmentation/Scene/SceneMappingService.cs +++ b/src/NzbDrone.Core/DataAugmentation/Scene/SceneMappingService.cs @@ -104,9 +104,16 @@ namespace NzbDrone.Core.DataAugmentation.Scene var distinctMappings = mappings.DistinctBy(v => v.TvdbId).ToList(); - if (distinctMappings.Count <= 1) + if (distinctMappings.Count == 0) { - return distinctMappings.FirstOrDefault(); + return null; + } + + if (distinctMappings.Count == 1) + { + var mapping = distinctMappings.First(); + _logger.Debug("Found scene mapping for: {0}. TVDB ID for mapping: {1}", seriesTitle, mapping.TvdbId); + return distinctMappings.First(); } throw new InvalidSceneMappingException(mappings, releaseTitle);