Image language fix

The language only needs to be added if it is not already part of the
list. It is not necessarily a problem, it just winds up with duplicates.
This commit is contained in:
Tim Hobbs 2014-03-24 13:02:58 -07:00
parent 38a0af6e86
commit 3632d679fb
2 changed files with 2 additions and 2 deletions

View File

@ -172,7 +172,7 @@ namespace MediaBrowser.Providers.BoxSets
if (!string.IsNullOrEmpty(language)) if (!string.IsNullOrEmpty(language))
{ {
// If preferred language isn't english, get those images too // If preferred language isn't english, get those images too
if (imageLanguages.Contains(language, StringComparer.OrdinalIgnoreCase)) if (!imageLanguages.Contains(language, StringComparer.OrdinalIgnoreCase))
{ {
imageLanguages.Add(language); imageLanguages.Add(language);
} }

View File

@ -295,7 +295,7 @@ namespace MediaBrowser.Providers.Movies
if (!string.IsNullOrEmpty(language)) if (!string.IsNullOrEmpty(language))
{ {
// If preferred language isn't english, get those images too // If preferred language isn't english, get those images too
if (imageLanguages.Contains(language, StringComparer.OrdinalIgnoreCase)) if (!imageLanguages.Contains(language, StringComparer.OrdinalIgnoreCase))
{ {
imageLanguages.Add(language); imageLanguages.Add(language);
} }