aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-07-20 22:55:35 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-07-20 22:55:35 -0400
commit1de6ce2a2bf77dd4d3e2be7d79d54e42d1e80777 (patch)
tree19ebe7929af2e615a614f9e5a7df0a6abf78c12d
parent1efde90e321e36cc2d899f0a169992b70c7141bd (diff)
update subtitle resolver
-rw-r--r--MediaBrowser.Providers/MediaInfo/SubtitleResolver.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/MediaBrowser.Providers/MediaInfo/SubtitleResolver.cs b/MediaBrowser.Providers/MediaInfo/SubtitleResolver.cs
index d2c0feabe..f64b7b792 100644
--- a/MediaBrowser.Providers/MediaInfo/SubtitleResolver.cs
+++ b/MediaBrowser.Providers/MediaInfo/SubtitleResolver.cs
@@ -72,7 +72,10 @@ namespace MediaBrowser.Providers.MediaInfo
// Try to translate to three character code
// Be flexible and check against both the full and three character versions
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) || string.Equals(i.TwoLetterISOLanguageName, 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)
{
@@ -99,10 +102,12 @@ namespace MediaBrowser.Providers.MediaInfo
private string NormalizeFilenameForSubtitleComparison(string filename)
{
// Try to account for sloppy file naming
- filename = filename.Replace("-", string.Empty);
filename = filename.Replace("_", string.Empty);
filename = filename.Replace(" ", string.Empty);
+ // can't normalize this due to languages such as pt-br
+ //filename = filename.Replace("-", string.Empty);
+
//filename = filename.Replace(".", string.Empty);
return filename;