mirror of
https://github.com/Radarr/Radarr.git
synced 2025-04-24 06:27:08 -04:00
Fixed: Loading movies with duplicated translations
This commit is contained in:
parent
55b9477a01
commit
69a9c72286
4 changed files with 8 additions and 11 deletions
|
@ -54,10 +54,8 @@ namespace NzbDrone.Common.Extensions
|
|||
foreach (var item in src)
|
||||
{
|
||||
var key = keySelector(item);
|
||||
if (!result.ContainsKey(key))
|
||||
{
|
||||
result[key] = item;
|
||||
}
|
||||
|
||||
result.TryAdd(key, item);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -69,10 +67,9 @@ namespace NzbDrone.Common.Extensions
|
|||
foreach (var item in src)
|
||||
{
|
||||
var key = keySelector(item);
|
||||
if (!result.ContainsKey(key))
|
||||
{
|
||||
result[key] = valueSelector(item);
|
||||
}
|
||||
var value = valueSelector(item);
|
||||
|
||||
result.TryAdd(key, value);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
@ -165,7 +165,7 @@ namespace Radarr.Api.V3.Collections
|
|||
.ToDictionary(x => x.Key, x => (IEnumerable<MovieMetadata>)x);
|
||||
|
||||
var translations = _movieTranslationService.GetAllTranslationsForLanguage(configLanguage);
|
||||
var tdict = translations.ToDictionary(x => x.MovieMetadataId);
|
||||
var tdict = translations.ToDictionaryIgnoreDuplicates(x => x.MovieMetadataId);
|
||||
|
||||
foreach (var collection in collections)
|
||||
{
|
||||
|
|
|
@ -150,7 +150,7 @@ namespace Radarr.Api.V3.Movies
|
|||
var translations = _movieTranslationService
|
||||
.GetAllTranslationsForLanguage(translationLanguage);
|
||||
|
||||
var tdict = translations.ToDictionary(x => x.MovieMetadataId);
|
||||
var tdict = translations.ToDictionaryIgnoreDuplicates(x => x.MovieMetadataId);
|
||||
var sdict = movieStats.ToDictionary(x => x.MovieId);
|
||||
|
||||
if (!excludeLocalCovers)
|
||||
|
|
|
@ -116,7 +116,7 @@ namespace Radarr.Api.V3.Movies
|
|||
var availabilityDelay = _configService.AvailabilityDelay;
|
||||
|
||||
var translations = _movieTranslationService.GetAllTranslationsForLanguage(configLanguage);
|
||||
var tdict = translations.ToDictionary(x => x.MovieMetadataId);
|
||||
var tdict = translations.ToDictionaryIgnoreDuplicates(x => x.MovieMetadataId);
|
||||
|
||||
var updatedMovies = _movieService.UpdateMovie(moviesToUpdate, !resource.MoveFiles);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue