mirror of
https://github.com/Radarr/Radarr
synced 2025-02-24 23:23:21 +00:00
Fixed only one movie appearing when list does not give us a tmdbid
This commit is contained in:
parent
8f79563cf0
commit
79307d3c25
2 changed files with 14 additions and 2 deletions
|
@ -81,7 +81,19 @@ public List<Movie> MovieListSearch(int listId, bool onlyEnableAuto = false)
|
||||||
|
|
||||||
_logger.Debug("Found {0} movies from list(s) {1}", movies.Count, string.Join(", ", lists.Select(l => l.Definition.Name)));
|
_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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ public StevenLuParser(StevenLuSettings settings)
|
||||||
movies.AddIfNotNull(new Tv.Movie()
|
movies.AddIfNotNull(new Tv.Movie()
|
||||||
{
|
{
|
||||||
Title = item.title,
|
Title = item.title,
|
||||||
ImdbId = item.imdb_id
|
ImdbId = item.imdb_id,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue