Fixed: Allow directory to be parsed similar to past implementation (#3057)

Fixes #3051
pull/3108/head
Ricardo Amaral 6 years ago committed by Leonardo Galli
parent 27032a8db3
commit 0c542eeb13

@ -26,7 +26,7 @@ namespace NzbDrone.Core.Parser
MappingResult Map(ParsedMovieInfo parsedMovieInfo, string imdbId, SearchCriteriaBase searchCriteria = null);
ParsedMovieInfo ParseMovieInfo(string title, List<object> helpers);
ParsedMovieInfo ParseMoviePathInfo(string path, List<object> helpers);
ParsedMovieInfo ParseMinimalMovieInfo(string path);
ParsedMovieInfo ParseMinimalMovieInfo(string path, bool isDir = false);
ParsedMovieInfo ParseMinimalPathMovieInfo(string path);
List<CustomFormat> ParseCustomFormat(ParsedMovieInfo movieInfo);
List<FormatTagMatchResult> MatchFormatTags(ParsedMovieInfo movieInfo);
@ -192,16 +192,16 @@ namespace NzbDrone.Core.Parser
};
}
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)
{

Loading…
Cancel
Save