Fixed: Avoid failure if list contains same movie but without tmdbid

Fixes #7454
pull/7468/head
Qstick 2 years ago
parent 70b22e483a
commit 915c66be50

@ -167,6 +167,7 @@ namespace NzbDrone.Core.ImportLists
{
var mappedMovies = reports.Select(m => _movieSearch.MapMovieToTmdbMovie(new MovieMetadata { Title = m.Title, TmdbId = m.TmdbId, ImdbId = m.ImdbId, Year = m.Year }))
.Where(x => x != null)
.DistinctBy(x => x.TmdbId)
.ToList();
_movieMetadataService.UpsertMany(mappedMovies);

Loading…
Cancel
Save