mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-18 21:35:51 -04:00
Fixed: Don't throw error IMDB mapped movie not found
This commit is contained in:
@@ -39,6 +39,7 @@ namespace NzbDrone.Core.Test.MetadataSource.SkyHook
|
|||||||
[TestCase("tmdbid: -12")]
|
[TestCase("tmdbid: -12")]
|
||||||
[TestCase("tmdbid:1")]
|
[TestCase("tmdbid:1")]
|
||||||
[TestCase("adjalkwdjkalwdjklawjdlKAJD;EF")]
|
[TestCase("adjalkwdjkalwdjklawjdlKAJD;EF")]
|
||||||
|
[TestCase("imdb: tt9805708")]
|
||||||
public void no_search_result(string term)
|
public void no_search_result(string term)
|
||||||
{
|
{
|
||||||
var result = Subject.SearchForNewMovie(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)
|
public List<Movie> DiscoverNewMovies(string action)
|
||||||
|
|||||||
Reference in New Issue
Block a user