1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-09-17 15:02:34 +02:00

Fixed: Don't blow up if a tmdbid not in DB is asked for on AllMovie Endpoint

This commit is contained in:
Qstick 2020-08-23 21:10:25 -04:00
parent 2cbeefba6e
commit eff03a7d2c

View File

@ -106,9 +106,12 @@ private List<MovieResource> AllMovie()
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
{