mirror of
https://github.com/Radarr/Radarr
synced 2025-02-25 07:32:56 +00:00
Revert "Move up IMDB logic in ParsingService, should help with the mismatched movies"
This reverts commit 066c746e5f
.
This commit is contained in:
parent
066c746e5f
commit
0dc67419be
1 changed files with 27 additions and 19 deletions
|
@ -354,17 +354,12 @@ private ParsedEpisodeInfo ParseSpecialEpisodeTitle(string title, Series series)
|
||||||
|
|
||||||
private Movie GetMovie(ParsedMovieInfo parsedMovieInfo, string imdbId, SearchCriteriaBase searchCriteria)
|
private Movie GetMovie(ParsedMovieInfo parsedMovieInfo, string imdbId, SearchCriteriaBase searchCriteria)
|
||||||
{
|
{
|
||||||
// IMDbID is present, movie this logic up
|
|
||||||
if (imdbId.IsNotNullOrWhiteSpace())
|
|
||||||
{
|
|
||||||
return _movieService.FindByImdbId(imdbId);
|
|
||||||
}
|
|
||||||
|
|
||||||
Movie possibleMovie = null;
|
|
||||||
|
|
||||||
if (searchCriteria != null)
|
if (searchCriteria != null)
|
||||||
{
|
{
|
||||||
var possibleTitles = new List<string>();
|
var possibleTitles = new List<string>();
|
||||||
|
|
||||||
|
Movie possibleMovie = null;
|
||||||
|
|
||||||
possibleTitles.Add(searchCriteria.Movie.CleanTitle);
|
possibleTitles.Add(searchCriteria.Movie.CleanTitle);
|
||||||
|
|
||||||
foreach (string altTitle in searchCriteria.Movie.AlternativeTitles)
|
foreach (string altTitle in searchCriteria.Movie.AlternativeTitles)
|
||||||
|
@ -396,35 +391,48 @@ private Movie GetMovie(ParsedMovieInfo parsedMovieInfo, string imdbId, SearchCri
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (possibleMovie != null && (parsedMovieInfo.Year < 1900 || possibleMovie.Year == parsedMovieInfo.Year))
|
if (possibleMovie != null && (parsedMovieInfo.Year < 1800 || possibleMovie.Year == parsedMovieInfo.Year))
|
||||||
{
|
{
|
||||||
return possibleMovie;
|
return possibleMovie;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
Movie movie = null;
|
||||||
|
|
||||||
|
if (searchCriteria == null)
|
||||||
{
|
{
|
||||||
if (parsedMovieInfo.Year > 1900)
|
if (parsedMovieInfo.Year > 1900)
|
||||||
{
|
{
|
||||||
possibleMovie = _movieService.FindByTitle(parsedMovieInfo.MovieTitle, parsedMovieInfo.Year);
|
movie = _movieService.FindByTitle(parsedMovieInfo.MovieTitle, parsedMovieInfo.Year);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
possibleMovie = _movieService.FindByTitle(parsedMovieInfo.MovieTitle);
|
movie = _movieService.FindByTitle(parsedMovieInfo.MovieTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (possibleMovie == null)
|
if (movie == null)
|
||||||
{
|
{
|
||||||
possibleMovie = _movieService.FindByTitle(parsedMovieInfo.MovieTitle);
|
movie = _movieService.FindByTitle(parsedMovieInfo.MovieTitle);
|
||||||
}
|
}
|
||||||
|
// return movie;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (possibleMovie == null)
|
|
||||||
|
|
||||||
|
if (movie == null && imdbId.IsNotNullOrWhiteSpace())
|
||||||
|
{
|
||||||
|
movie = _movieService.FindByImdbId(imdbId);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (movie == null)
|
||||||
{
|
{
|
||||||
_logger.Debug($"No matching movie {parsedMovieInfo.MovieTitle}");
|
_logger.Debug($"No matching movie {parsedMovieInfo.MovieTitle}");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return possibleMovie;
|
return movie;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Series GetSeries(ParsedEpisodeInfo parsedEpisodeInfo, int tvdbId, int tvRageId, SearchCriteriaBase searchCriteria)
|
private Series GetSeries(ParsedEpisodeInfo parsedEpisodeInfo, int tvdbId, int tvRageId, SearchCriteriaBase searchCriteria)
|
||||||
|
|
Loading…
Reference in a new issue