mirror of
https://github.com/Radarr/Radarr.git
synced 2024-08-18 16:29:41 +02:00
parent
e64dd799e6
commit
6702c7d21b
@ -39,7 +39,8 @@ public class LanguageFixture : CoreTest
|
||||
new object[] { 27, Language.Romanian },
|
||||
new object[] { 28, Language.Thai },
|
||||
new object[] { 29, Language.Bulgarian },
|
||||
new object[] { 30, Language.PortugueseBR }
|
||||
new object[] { 30, Language.PortugueseBR },
|
||||
new object[] { 31, Language.Arabic }
|
||||
};
|
||||
|
||||
public static object[] ToIntCases =
|
||||
@ -73,7 +74,8 @@ public class LanguageFixture : CoreTest
|
||||
new object[] { Language.Romanian, 27 },
|
||||
new object[] { Language.Thai, 28 },
|
||||
new object[] { Language.Bulgarian, 29 },
|
||||
new object[] { Language.PortugueseBR, 30 }
|
||||
new object[] { Language.PortugueseBR, 30 },
|
||||
new object[] { Language.Arabic, 31 }
|
||||
};
|
||||
|
||||
[Test]
|
||||
|
@ -287,6 +287,13 @@ public void should_parse_language_czech(string postTitle)
|
||||
result.Languages.Should().BeEquivalentTo(Language.Czech);
|
||||
}
|
||||
|
||||
[TestCase("Mosul.2019.ARABIC.WEBRip.x264-VXT")]
|
||||
public void should_parse_language_arabic(string postTitle)
|
||||
{
|
||||
var result = Parser.Parser.ParseMovieTitle(postTitle);
|
||||
result.Languages.Should().BeEquivalentTo(Language.Arabic);
|
||||
}
|
||||
|
||||
[TestCase("Pulp Fiction.en.sub")]
|
||||
[TestCase("Pulp Fiction.eng.sub")]
|
||||
[TestCase("Pulp.Fiction.eng.forced.sub")]
|
||||
|
@ -101,6 +101,7 @@ public override bool Equals(object obj)
|
||||
public static Language Thai => new Language(28, "Thai");
|
||||
public static Language Bulgarian => new Language(29, "Bulgarian");
|
||||
public static Language PortugueseBR => new Language(30, "Portuguese (Brazil)");
|
||||
public static Language Arabic => new Language(31, "Arabic");
|
||||
public static Language Any => new Language(-1, "Any");
|
||||
public static Language Original => new Language(-2, "Original");
|
||||
|
||||
@ -141,6 +142,7 @@ public static List<Language> All
|
||||
Thai,
|
||||
Bulgarian,
|
||||
PortugueseBR,
|
||||
Arabic,
|
||||
Any,
|
||||
Original
|
||||
};
|
||||
|
@ -36,7 +36,8 @@ public static class IsoLanguages
|
||||
new IsoLanguage("th", "", "tha", "Thai", Language.Thai),
|
||||
new IsoLanguage("bg", "", "bul", "Bulgarian", Language.Bulgarian),
|
||||
new IsoLanguage("ro", "", "ron", "Romanian", Language.Romanian),
|
||||
new IsoLanguage("pt", "br", "", "Portuguese (Brazil)", Language.PortugueseBR)
|
||||
new IsoLanguage("pt", "br", "", "Portuguese (Brazil)", Language.PortugueseBR),
|
||||
new IsoLanguage("ar", "", "ara", "Arabic", Language.Arabic)
|
||||
};
|
||||
|
||||
public static IsoLanguage Find(string isoCode)
|
||||
|
@ -87,6 +87,11 @@ public static List<Language> ParseLanguages(string title)
|
||||
languages.Add(Language.Hindi);
|
||||
}
|
||||
|
||||
if (lowerTitle.Contains("arabic"))
|
||||
{
|
||||
languages.Add(Language.Arabic);
|
||||
}
|
||||
|
||||
if (lowerTitle.Contains("thai"))
|
||||
{
|
||||
languages.Add(Language.Thai);
|
||||
|
Loading…
Reference in New Issue
Block a user