mirror of https://github.com/Radarr/Radarr
Avoid db call for naming config on every movie during single collection call
This commit is contained in:
parent
c214a6b67b
commit
ae8820178d
|
@ -162,11 +162,12 @@ namespace Radarr.Api.V3.Collections
|
|||
{
|
||||
var resource = collection.ToResource();
|
||||
var existingMoviesTmdbIds = _movieService.AllMovieWithCollectionsTmdbIds();
|
||||
var namingConfig = _namingService.GetConfig();
|
||||
|
||||
foreach (var movie in _movieMetadataService.GetMoviesByCollectionTmdbId(collection.TmdbId))
|
||||
{
|
||||
var movieResource = movie.ToResource();
|
||||
movieResource.Folder = _fileNameBuilder.GetMovieFolder(new Movie { MovieMetadata = movie });
|
||||
movieResource.Folder = _fileNameBuilder.GetMovieFolder(new Movie { MovieMetadata = movie }, namingConfig);
|
||||
|
||||
if (!existingMoviesTmdbIds.Contains(movie.TmdbId))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue