mirror of
https://github.com/Radarr/Radarr.git
synced 2024-08-17 15:59:36 +02:00
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 @@ private CollectionResource MapToResource(MovieCollection collection)
|
||||
{
|
||||
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
Block a user