1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-09-11 12:02:35 +02:00

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

View File

@ -191,7 +191,7 @@ public Movie MapMovie(MovieResource resource)
movie.Certification = resource.Certifications.FirstOrDefault(m => m.Country == certificationCountry)?.Certification;
movie.Ratings = resource.Ratings.Select(MapRatings).FirstOrDefault() ?? new Ratings();
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;