From e6288148ad10cca783ce9b3dc03b673baeda5e51 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Tue, 20 Sep 2016 20:40:53 -0700 Subject: [PATCH] Fixed: Suppress warning log messages when unable to parse non-video files --- src/NzbDrone.Core/Parser/Parser.cs | 6 ------ src/NzbDrone.Core/Parser/ParsingService.cs | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index 8127df11a..064b11ad7 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -279,12 +279,6 @@ public static ParsedEpisodeInfo ParsePath(string path) result = ParseTitle(fileInfo.Directory.Name + fileInfo.Extension); } - if (result == null) - { - Logger.Warn("Unable to parse episode info from path {0}", path); - return null; - } - return result; } diff --git a/src/NzbDrone.Core/Parser/ParsingService.cs b/src/NzbDrone.Core/Parser/ParsingService.cs index 5e8096790..beeebeb1a 100644 --- a/src/NzbDrone.Core/Parser/ParsingService.cs +++ b/src/NzbDrone.Core/Parser/ParsingService.cs @@ -6,6 +6,7 @@ using NzbDrone.Common.Extensions; using NzbDrone.Core.DataAugmentation.Scene; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.MediaFiles; using NzbDrone.Core.Parser.Model; using NzbDrone.Core.Tv; @@ -73,6 +74,11 @@ public LocalEpisode GetLocalEpisode(string filename, Series series, ParsedEpisod if (parsedEpisodeInfo == null) { + if (MediaFileExtensions.Extensions.Contains(Path.GetExtension(filename))) + { + _logger.Warn("Unable to parse episode info from path {0}", filename); + } + return null; }