mirror of https://github.com/Radarr/Radarr
Fixed: Don't blow up if a tmdbid not in DB is asked for on AllMovie Endpoint
This commit is contained in:
parent
2cbeefba6e
commit
eff03a7d2c
|
@ -106,10 +106,13 @@ namespace Radarr.Api.V3.Movies
|
||||||
if (tmdbId > 0)
|
if (tmdbId > 0)
|
||||||
{
|
{
|
||||||
var movie = _moviesService.FindByTmdbId(tmdbId);
|
var movie = _moviesService.FindByTmdbId(tmdbId);
|
||||||
var translation = _movieTranslationService.GetAllTranslationsForMovie(movie.Id).Where(t => t.Language == (Language)_configService.MovieInfoLanguage).FirstOrDefault();
|
|
||||||
|
|
||||||
|
if (movie != null)
|
||||||
|
{
|
||||||
|
var translation = _movieTranslationService.GetAllTranslationsForMovie(movie.Id).Where(t => t.Language == (Language)_configService.MovieInfoLanguage).FirstOrDefault();
|
||||||
moviesResources.AddIfNotNull(movie.ToResource(_qualityUpgradableSpecification, translation));
|
moviesResources.AddIfNotNull(movie.ToResource(_qualityUpgradableSpecification, translation));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var translations = _movieTranslationService.GetAllTranslationsForLanguage((Language)_configService.MovieInfoLanguage);
|
var translations = _movieTranslationService.GetAllTranslationsForLanguage((Language)_configService.MovieInfoLanguage);
|
||||||
|
|
Loading…
Reference in New Issue