From db05f0464a85f2177794cdb99296c2cb476e264f Mon Sep 17 00:00:00 2001 From: Qstick Date: Sat, 19 Sep 2020 22:41:07 -0400 Subject: [PATCH] Fixed: Return existing item props on lookup with IMDBId or TMDBId Fixes #5037 --- src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs b/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs index e8a055113..b517acbe5 100644 --- a/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs +++ b/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs @@ -328,7 +328,8 @@ public List SearchForNewMovie(string title) { try { - return new List { GetMovieByImdbId(parserResult.ImdbId) }; + var movieLookup = GetMovieByImdbId(parserResult.ImdbId); + return movieLookup == null ? new List() : new List { _movieService.FindByTmdbId(movieLookup.TmdbId) ?? movieLookup }; } catch (Exception) { @@ -352,7 +353,8 @@ public List SearchForNewMovie(string title) try { - return new List { GetMovieByImdbId(imdbid) }; + var movieLookup = GetMovieByImdbId(imdbid); + return movieLookup == null ? new List() : new List { _movieService.FindByTmdbId(movieLookup.TmdbId) ?? movieLookup }; } catch (MovieNotFoundException) { @@ -373,7 +375,8 @@ public List SearchForNewMovie(string title) try { - return new List { GetMovieInfo(tmdbid).Item1 }; + var movieLookup = GetMovieInfo(tmdbid).Item1; + return movieLookup == null ? new List() : new List { _movieService.FindByTmdbId(movieLookup.TmdbId) ?? movieLookup }; } catch (MovieNotFoundException) {