mirror of
https://github.com/Radarr/Radarr.git
synced 2024-08-18 16:29:41 +02:00
New: Add Thai Language
This commit is contained in:
parent
2823099237
commit
e28bea14b3
@ -131,6 +131,14 @@ public void should_parse_language_hindi(string postTitle)
|
||||
result.Languages.Should().BeEquivalentTo(Language.Hindi);
|
||||
}
|
||||
|
||||
[TestCase("Pulp.Fiction.1994.Thai.1080p.XviD-LOL")]
|
||||
public void should_parse_language_thai(string postTitle)
|
||||
{
|
||||
var result = Parser.Parser.ParseMovieTitle(postTitle, true);
|
||||
|
||||
result.Languages.Should().BeEquivalentTo(Language.Thai);
|
||||
}
|
||||
|
||||
[TestCase("Pulp.Fiction.1994.Polish.1080p.XviD-LOL")]
|
||||
public void should_parse_language_polish(string postTitle)
|
||||
{
|
||||
|
@ -98,6 +98,7 @@ public override bool Equals(object obj)
|
||||
public static Language Czech => new Language(25, "Czech");
|
||||
public static Language Hindi => new Language(26, "Hindi");
|
||||
public static Language Romanian => new Language(27, "Romanian");
|
||||
public static Language Thai => new Language(28, "Thai");
|
||||
public static Language Any => new Language(-1, "Any");
|
||||
public static Language Original => new Language(-2, "Original");
|
||||
|
||||
@ -135,6 +136,7 @@ public static List<Language> All
|
||||
Czech,
|
||||
Romanian,
|
||||
Hindi,
|
||||
Thai,
|
||||
Any,
|
||||
Original
|
||||
};
|
||||
|
@ -33,6 +33,7 @@ public static class IsoLanguages
|
||||
new IsoLanguage("he", "", "heb", "Hebrew", Language.Hebrew),
|
||||
new IsoLanguage("cs", "", "ces", "Czech", Language.Czech),
|
||||
new IsoLanguage("hi", "", "hin", "Hindi", Language.Hindi),
|
||||
new IsoLanguage("th", "", "tha", "Thai", Language.Thai),
|
||||
new IsoLanguage("ro", "", "ron", "Romanian", Language.Romanian)
|
||||
};
|
||||
|
||||
|
@ -87,6 +87,11 @@ public static List<Language> ParseLanguages(string title)
|
||||
languages.Add(Language.Hindi);
|
||||
}
|
||||
|
||||
if (lowerTitle.Contains("thai"))
|
||||
{
|
||||
languages.Add(Language.Thai);
|
||||
}
|
||||
|
||||
if (lowerTitle.Contains("polish"))
|
||||
{
|
||||
languages.Add(Language.Polish);
|
||||
|
Loading…
Reference in New Issue
Block a user