mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
Fixed: Return existing item props on lookup with IMDBId or TMDBId
Fixes #5037
This commit is contained in:
parent
ff3fd0bb1e
commit
db05f0464a
@ -328,7 +328,8 @@ public List<Movie> SearchForNewMovie(string title)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return new List<Movie> { GetMovieByImdbId(parserResult.ImdbId) };
|
var movieLookup = GetMovieByImdbId(parserResult.ImdbId);
|
||||||
|
return movieLookup == null ? new List<Movie>() : new List<Movie> { _movieService.FindByTmdbId(movieLookup.TmdbId) ?? movieLookup };
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
@ -352,7 +353,8 @@ public List<Movie> SearchForNewMovie(string title)
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return new List<Movie> { GetMovieByImdbId(imdbid) };
|
var movieLookup = GetMovieByImdbId(imdbid);
|
||||||
|
return movieLookup == null ? new List<Movie>() : new List<Movie> { _movieService.FindByTmdbId(movieLookup.TmdbId) ?? movieLookup };
|
||||||
}
|
}
|
||||||
catch (MovieNotFoundException)
|
catch (MovieNotFoundException)
|
||||||
{
|
{
|
||||||
@ -373,7 +375,8 @@ public List<Movie> SearchForNewMovie(string title)
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return new List<Movie> { GetMovieInfo(tmdbid).Item1 };
|
var movieLookup = GetMovieInfo(tmdbid).Item1;
|
||||||
|
return movieLookup == null ? new List<Movie>() : new List<Movie> { _movieService.FindByTmdbId(movieLookup.TmdbId) ?? movieLookup };
|
||||||
}
|
}
|
||||||
catch (MovieNotFoundException)
|
catch (MovieNotFoundException)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user