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

New: Store and use original Series language

This commit is contained in:
Qstick
2022-10-02 20:29:53 -05:00
committed by Mark McDowall
parent 5400bce129
commit be0fa73129
29 changed files with 193 additions and 113 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ namespace NzbDrone.Core.Parser
private static readonly Regex SubtitleLanguageRegex = new Regex(".+?[-_. ](?<iso_code>[a-z]{2,3})([-_. ](?<tags>full|forced|foreign|default|cc|psdh|sdh))*$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
public static List<Language> ParseLanguages(string title, bool defaultToEnglish = true)
public static List<Language> ParseLanguages(string title)
{
foreach (var regex in CleanSeriesTitleRegex)
{
@@ -175,7 +175,7 @@ namespace NzbDrone.Core.Parser
if (!languages.Any())
{
languages.Add(defaultToEnglish ? Language.English : Language.Unknown);
languages.Add(Language.Unknown);
}
return languages.DistinctBy(l => (int)l).ToList();