mirror of
https://github.com/Radarr/Radarr
synced 2025-01-03 05:44:50 +00:00
Fixed: Parse "Català" and "Catalán" as Catalan
This commit is contained in:
parent
06d54e0ec2
commit
8f507ac726
2 changed files with 10 additions and 5 deletions
|
@ -416,6 +416,10 @@ public void should_parse_language_spanish_latino(string postTitle)
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestCase("Movie.Title.1994.Catalan.1080p.XviD-LOL")]
|
[TestCase("Movie.Title.1994.Catalan.1080p.XviD-LOL")]
|
||||||
|
[TestCase("Movie.Title.2024.Catalán.1080p.XviD-LOL")]
|
||||||
|
[TestCase("Movie.Title.(2024).(Catala.Spanish.Subs).WEBRip.1080p.x264-EAC3")]
|
||||||
|
[TestCase("Movie.Title.(2024).(Spanish.Catala.English.Subs).BDRip.1080p.x264-EAC3")]
|
||||||
|
[TestCase("Movie Title [2024] [BDrip 1080p-x264-AC3 5.1 català-español-english+sub]")]
|
||||||
public void should_parse_language_catalan(string postTitle)
|
public void should_parse_language_catalan(string postTitle)
|
||||||
{
|
{
|
||||||
var result = Parser.Parser.ParseMovieTitle(postTitle, true);
|
var result = Parser.Parser.ParseMovieTitle(postTitle, true);
|
||||||
|
|
|
@ -31,6 +31,7 @@ public static class LanguageParser
|
||||||
(?<chinese>\[(?:CH[ST]|BIG5|GB)\]|简|繁|字幕)|
|
(?<chinese>\[(?:CH[ST]|BIG5|GB)\]|简|繁|字幕)|
|
||||||
(?<ukrainian>(?:(?:\dx)?UKR))|
|
(?<ukrainian>(?:(?:\dx)?UKR))|
|
||||||
(?<spanish>\b(?:español|castellano)\b)|
|
(?<spanish>\b(?:español|castellano)\b)|
|
||||||
|
(?<catalan>\b(?:catalan?|catalán|català)\b)|
|
||||||
(?<latvian>\b(?:lat|lav|lv)\b)|
|
(?<latvian>\b(?:lat|lav|lv)\b)|
|
||||||
(?<telugu>\btel\b)|
|
(?<telugu>\btel\b)|
|
||||||
(?<vietnamese>\bVIE\b)",
|
(?<vietnamese>\bVIE\b)",
|
||||||
|
@ -208,11 +209,6 @@ public static List<Language> ParseLanguages(string title)
|
||||||
languages.Add(Language.SpanishLatino);
|
languages.Add(Language.SpanishLatino);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lowerTitle.Contains("catalan"))
|
|
||||||
{
|
|
||||||
languages.Add(Language.Catalan);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (lowerTitle.Contains("tamil"))
|
if (lowerTitle.Contains("tamil"))
|
||||||
{
|
{
|
||||||
languages.Add(Language.Tamil);
|
languages.Add(Language.Tamil);
|
||||||
|
@ -348,6 +344,11 @@ public static List<Language> ParseLanguages(string title)
|
||||||
languages.Add(Language.Spanish);
|
languages.Add(Language.Spanish);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (match.Groups["catalan"].Success)
|
||||||
|
{
|
||||||
|
languages.Add(Language.Catalan);
|
||||||
|
}
|
||||||
|
|
||||||
if (match.Groups["ukrainian"].Success)
|
if (match.Groups["ukrainian"].Success)
|
||||||
{
|
{
|
||||||
languages.Add(Language.Ukrainian);
|
languages.Add(Language.Ukrainian);
|
||||||
|
|
Loading…
Reference in a new issue