mirror of
https://github.com/Radarr/Radarr
synced 2025-01-04 06:23:32 +00:00
Fixed: Don't throw error IMDB mapped movie not found
This commit is contained in:
parent
0ca72bf444
commit
089c9657f9
2 changed files with 6 additions and 2 deletions
|
@ -39,6 +39,7 @@ public void successful_search(string title, string expected)
|
||||||
[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 @@ 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)
|
public List<Movie> DiscoverNewMovies(string action)
|
||||||
|
|
Loading…
Reference in a new issue