mirror of
https://github.com/Radarr/Radarr.git
synced 2024-08-17 15:59:36 +02:00
Fixed: Don't die in Collections when a collection doesn't have movies
This commit is contained in:
parent
ecfaea3885
commit
9b36404071
@ -159,19 +159,22 @@ private IEnumerable<CollectionResource> MapToResource(List<MovieCollection> coll
|
|||||||
|
|
||||||
allCollectionMovies.TryGetValue(collection.TmdbId, out var collectionMovies);
|
allCollectionMovies.TryGetValue(collection.TmdbId, out var collectionMovies);
|
||||||
|
|
||||||
foreach (var movie in collectionMovies)
|
if (collectionMovies != null)
|
||||||
{
|
{
|
||||||
var translation = GetTranslationFromDict(tdict, movie, configLanguage);
|
foreach (var movie in collectionMovies)
|
||||||
|
|
||||||
var movieResource = movie.ToResource(translation);
|
|
||||||
movieResource.Folder = _fileNameBuilder.GetMovieFolder(new Movie { MovieMetadata = movie }, namingConfig);
|
|
||||||
|
|
||||||
if (!existingMoviesTmdbIds.Contains(movie.TmdbId))
|
|
||||||
{
|
{
|
||||||
resource.MissingMovies++;
|
var translation = GetTranslationFromDict(tdict, movie, configLanguage);
|
||||||
}
|
|
||||||
|
|
||||||
resource.Movies.Add(movieResource);
|
var movieResource = movie.ToResource(translation);
|
||||||
|
movieResource.Folder = _fileNameBuilder.GetMovieFolder(new Movie { MovieMetadata = movie }, namingConfig);
|
||||||
|
|
||||||
|
if (!existingMoviesTmdbIds.Contains(movie.TmdbId))
|
||||||
|
{
|
||||||
|
resource.MissingMovies++;
|
||||||
|
}
|
||||||
|
|
||||||
|
resource.Movies.Add(movieResource);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
yield return resource;
|
yield return resource;
|
||||||
|
Loading…
Reference in New Issue
Block a user