Fixed: Don't fail lookup if no Recommendations for a result

This commit is contained in:
Qstick 2020-06-21 22:14:31 -04:00
parent c896833607
commit 8687dbda1d
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
movie.Certification = resource.Certifications.FirstOrDefault(m => m.Country == certificationCountry)?.Certification; movie.Certification = resource.Certifications.FirstOrDefault(m => m.Country == certificationCountry)?.Certification;
movie.Ratings = resource.Ratings.Select(MapRatings).FirstOrDefault() ?? new Ratings(); movie.Ratings = resource.Ratings.Select(MapRatings).FirstOrDefault() ?? new Ratings();
movie.Genres = resource.Genres; movie.Genres = resource.Genres;
movie.Recommendations = resource.Recommendations.Select(r => r.TmdbId).ToList(); movie.Recommendations = resource.Recommendations?.Select(r => r.TmdbId).ToList() ?? new List<int>();
var now = DateTime.Now; var now = DateTime.Now;