1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Fixed: Don't automatic import if year mismatch

Fixes #3006
This commit is contained in:
Qstick 2020-08-04 23:17:17 -04:00
parent e3fb000226
commit 43d6b404f5

View File

@ -114,14 +114,12 @@ public Movie GetMovie(string title)
return _movieService.FindByTitle(title); return _movieService.FindByTitle(title);
} }
var movie = _movieService.FindByTitle(parsedMovieInfo.MovieTitle, parsedMovieInfo.Year); if (TryGetMovieByTitleAndOrYear(parsedMovieInfo, out var result) && result.MappingResultType == MappingResultType.Success)
if (movie == null)
{ {
movie = _movieService.FindByTitle(parsedMovieInfo.MovieTitle.Replace("DC", "").Trim()); return result.Movie;
} }
return movie; return null;
} }
public MappingResult Map(ParsedMovieInfo parsedMovieInfo, string imdbId, SearchCriteriaBase searchCriteria = null) public MappingResult Map(ParsedMovieInfo parsedMovieInfo, string imdbId, SearchCriteriaBase searchCriteria = null)