1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-22 22:16:13 -04:00

Fixed: Don't use language parsed from episode title during import

Closes #3893
This commit is contained in:
Mark McDowall
2020-08-02 12:42:38 -07:00
parent 5193f01c8c
commit 18708f30d9
5 changed files with 67 additions and 26 deletions
+2 -2
View File
@@ -26,7 +26,7 @@ namespace NzbDrone.Core.Parser
private static readonly Regex SubtitleLanguageRegex = new Regex(".+?[-_. ](?<iso_code>[a-z]{2,3})$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
public static Language ParseLanguage(string title)
public static Language ParseLanguage(string title, bool defaultToEnglish = true)
{
foreach (var regex in CleanSeriesTitleRegex)
{
@@ -103,7 +103,7 @@ namespace NzbDrone.Core.Parser
return regexLanguage;
}
return Language.English;
return defaultToEnglish ? Language.English : Language.Unknown;
}
public static Language ParseSubtitleLanguage(string fileName)