1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-16 21:15:33 -04:00

Fixed only one movie appearing when list does not give us a tmdbid

This commit is contained in:
Leonardo Galli
2017-03-26 14:59:36 +02:00
parent 8f79563cf0
commit 79307d3c25
2 changed files with 14 additions and 2 deletions

View File

@@ -81,7 +81,19 @@ namespace NzbDrone.Core.NetImport
_logger.Debug("Found {0} movies from list(s) {1}", movies.Count, string.Join(", ", lists.Select(l => l.Definition.Name)));
return movies.DistinctBy(x => x.TmdbId).ToList();
return movies.DistinctBy(x => {
if (x.TmdbId != 0)
{
return x.TmdbId.ToString();
}
if (x.ImdbId.IsNotNullOrWhiteSpace())
{
return x.ImdbId;
}
return x.Title;
}).ToList();
}