Allow two character language code for subtitles

This commit is contained in:
Luke Pulverenti 2013-06-14 08:19:22 -04:00
parent fe29d3c8dc
commit f64b06f76a

View File

@ -345,7 +345,7 @@ namespace MediaBrowser.Providers.MediaInfo
// Try to translate to three character code // Try to translate to three character code
// Be flexible and check against both the full and three character versions // Be flexible and check against both the full and three character versions
var culture = _localization.GetCultures() var culture = _localization.GetCultures()
.FirstOrDefault(i => string.Equals(i.DisplayName, language, StringComparison.OrdinalIgnoreCase) || string.Equals(i.Name, language, StringComparison.OrdinalIgnoreCase) || string.Equals(i.ThreeLetterISOLanguageName, language, StringComparison.OrdinalIgnoreCase)); .FirstOrDefault(i => string.Equals(i.DisplayName, language, StringComparison.OrdinalIgnoreCase) || string.Equals(i.Name, language, StringComparison.OrdinalIgnoreCase) || string.Equals(i.ThreeLetterISOLanguageName, language, StringComparison.OrdinalIgnoreCase) || string.Equals(i.TwoLetterISOLanguageName, language, StringComparison.OrdinalIgnoreCase));
if (culture != null) if (culture != null)
{ {