From eff03a7d2c9881f20c9dfc3a421182bcb4112f4a Mon Sep 17 00:00:00 2001 From: Qstick Date: Sun, 23 Aug 2020 21:10:25 -0400 Subject: [PATCH] Fixed: Don't blow up if a tmdbid not in DB is asked for on AllMovie Endpoint --- src/Radarr.Api.V3/Movies/MovieModule.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Radarr.Api.V3/Movies/MovieModule.cs b/src/Radarr.Api.V3/Movies/MovieModule.cs index 9d0997cba..8b8b22216 100644 --- a/src/Radarr.Api.V3/Movies/MovieModule.cs +++ b/src/Radarr.Api.V3/Movies/MovieModule.cs @@ -106,9 +106,12 @@ namespace Radarr.Api.V3.Movies if (tmdbId > 0) { var movie = _moviesService.FindByTmdbId(tmdbId); - var translation = _movieTranslationService.GetAllTranslationsForMovie(movie.Id).Where(t => t.Language == (Language)_configService.MovieInfoLanguage).FirstOrDefault(); - moviesResources.AddIfNotNull(movie.ToResource(_qualityUpgradableSpecification, translation)); + if (movie != null) + { + var translation = _movieTranslationService.GetAllTranslationsForMovie(movie.Id).Where(t => t.Language == (Language)_configService.MovieInfoLanguage).FirstOrDefault(); + moviesResources.AddIfNotNull(movie.ToResource(_qualityUpgradableSpecification, translation)); + } } else {