diff --git a/src/NzbDrone.Core.Test/MetadataSource/SkyHook/SkyHookProxySearchFixture.cs b/src/NzbDrone.Core.Test/MetadataSource/SkyHook/SkyHookProxySearchFixture.cs index 6b047f50c..24e3fc050 100644 --- a/src/NzbDrone.Core.Test/MetadataSource/SkyHook/SkyHookProxySearchFixture.cs +++ b/src/NzbDrone.Core.Test/MetadataSource/SkyHook/SkyHookProxySearchFixture.cs @@ -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); diff --git a/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs b/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs index 0039e32a5..5dfe12f52 100644 --- a/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs +++ b/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs @@ -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 DiscoverNewMovies(string action)