mirror of
https://github.com/Radarr/Radarr.git
synced 2024-10-05 15:47:20 +02:00
New: Parse VIE
as Vietnamese language
This commit is contained in:
parent
50f48277e5
commit
54d447d55f
@ -219,6 +219,7 @@ public void should_parse_language_polish_subbed(string postTitle)
|
||||
}
|
||||
|
||||
[TestCase("Movie.Title.1994.Vietnamese.1080p.XviD-LOL")]
|
||||
[TestCase("Movie.Title.1994.VIE.1080p.XviD-LOL")]
|
||||
public void should_parse_language_vietnamese(string postTitle)
|
||||
{
|
||||
var result = Parser.Parser.ParseMovieTitle(postTitle, true);
|
||||
|
@ -31,7 +31,8 @@ public static class LanguageParser
|
||||
(?<ukrainian>(?:(?:\dx)?UKR))|
|
||||
(?<spanish>\b(?:español|castellano)\b)|
|
||||
(?<latvian>\bLV\b)|
|
||||
(?<telugu>\btel\b)",
|
||||
(?<telugu>\btel\b)|
|
||||
(?<vietnamese>\bVIE\b)",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled | RegexOptions.IgnorePatternWhitespace);
|
||||
|
||||
private static readonly Regex CaseSensitiveLanguageRegex = new Regex(@"(?:(?i)(?<!SUB[\W|_|^]))(?:(?<lithuanian>\bLT\b)|
|
||||
@ -347,6 +348,11 @@ public static List<Language> ParseLanguages(string title)
|
||||
{
|
||||
languages.Add(Language.Telugu);
|
||||
}
|
||||
|
||||
if (match.Groups["vietnamese"].Success)
|
||||
{
|
||||
languages.Add(Language.Vietnamese);
|
||||
}
|
||||
}
|
||||
|
||||
if (!languages.Any())
|
||||
|
Loading…
Reference in New Issue
Block a user