1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-10-05 15:47:20 +02:00

Fixed: Don't throw error IMDB mapped movie not found

This commit is contained in:
Qstick 2019-12-21 14:18:38 -05:00
parent 0ca72bf444
commit 089c9657f9
2 changed files with 6 additions and 2 deletions

View File

@ -39,6 +39,7 @@ public void successful_search(string title, string expected)
[TestCase("tmdbid: -12")]
[TestCase("tmdbid:1")]
[TestCase("adjalkwdjkalwdjklawjdlKAJD;EF")]
[TestCase("imdb: tt9805708")]
public void no_search_result(string term)
{
var result = Subject.SearchForNewMovie(term);

View File

@ -332,9 +332,12 @@ public Movie GetMovieInfo(string imdbId)
}
}
var resource = response.Resource.movie_results.FirstOrDefault();
if (!response.Resource.movie_results.Any())
{
throw new MovieNotFoundException(imdbId);
}
return MapMovie(resource);
return MapMovie(response.Resource.movie_results.First());
}
public List<Movie> DiscoverNewMovies(string action)