From 0c542eeb13cebc2c1ec08efc7fab49ab8865d003 Mon Sep 17 00:00:00 2001 From: Ricardo Amaral Date: Mon, 15 Oct 2018 08:43:23 +0100 Subject: [PATCH] Fixed: Allow directory to be parsed similar to past implementation (#3057) Fixes #3051 --- src/NzbDrone.Core/Parser/ParsingService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NzbDrone.Core/Parser/ParsingService.cs b/src/NzbDrone.Core/Parser/ParsingService.cs index 2c32ef7e6..dcf5568ce 100644 --- a/src/NzbDrone.Core/Parser/ParsingService.cs +++ b/src/NzbDrone.Core/Parser/ParsingService.cs @@ -26,7 +26,7 @@ public interface IParsingService MappingResult Map(ParsedMovieInfo parsedMovieInfo, string imdbId, SearchCriteriaBase searchCriteria = null); ParsedMovieInfo ParseMovieInfo(string title, List helpers); ParsedMovieInfo ParseMoviePathInfo(string path, List helpers); - ParsedMovieInfo ParseMinimalMovieInfo(string path); + ParsedMovieInfo ParseMinimalMovieInfo(string path, bool isDir = false); ParsedMovieInfo ParseMinimalPathMovieInfo(string path); List ParseCustomFormat(ParsedMovieInfo movieInfo); List MatchFormatTags(ParsedMovieInfo movieInfo); @@ -192,16 +192,16 @@ public LocalMovie GetLocalMovie(string filename, ParsedMovieInfo minimalInfo, Mo }; } - public ParsedMovieInfo ParseMinimalMovieInfo(string file) + public ParsedMovieInfo ParseMinimalMovieInfo(string file, bool isDir = false) { - return Parser.ParseMovieTitle(file, _config.ParsingLeniency > 0); + return Parser.ParseMovieTitle(file, _config.ParsingLeniency > 0, isDir); } public ParsedMovieInfo ParseMinimalPathMovieInfo(string path) { var fileInfo = new FileInfo(path); - var result = ParseMinimalMovieInfo(fileInfo.Name); + var result = ParseMinimalMovieInfo(fileInfo.Name, true); if (result == null) {