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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user