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

pull/2/head
Qstick 5 years ago
parent 0ca72bf444
commit 089c9657f9

@ -39,6 +39,7 @@ namespace NzbDrone.Core.Test.MetadataSource.SkyHook
[TestCase("tmdbid: -12")]
[TestCase("tmdbid:1")]
[TestCase("adjalkwdjkalwdjklawjdlKAJD;EF")]
[TestCase("imdb: tt9805708")]
public void no_search_result(string term)
{
var result = Subject.SearchForNewMovie(term);

@ -332,9 +332,12 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
}
}
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)

Loading…
Cancel
Save