mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 20:12:41 +02:00
parent
53eeee8b91
commit
2823099237
@ -115,6 +115,22 @@ public void should_parse_language_russian(string postTitle)
|
|||||||
result.Languages.Should().BeEquivalentTo(Language.Russian);
|
result.Languages.Should().BeEquivalentTo(Language.Russian);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestCase("Pulp.Fiction.1994.Romanian.1080p.XviD-LOL")]
|
||||||
|
public void should_parse_language_romanian(string postTitle)
|
||||||
|
{
|
||||||
|
var result = Parser.Parser.ParseMovieTitle(postTitle, true);
|
||||||
|
|
||||||
|
result.Languages.Should().BeEquivalentTo(Language.Romanian);
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestCase("Pulp.Fiction.1994.Hindi.1080p.XviD-LOL")]
|
||||||
|
public void should_parse_language_hindi(string postTitle)
|
||||||
|
{
|
||||||
|
var result = Parser.Parser.ParseMovieTitle(postTitle, true);
|
||||||
|
|
||||||
|
result.Languages.Should().BeEquivalentTo(Language.Hindi);
|
||||||
|
}
|
||||||
|
|
||||||
[TestCase("Pulp.Fiction.1994.Polish.1080p.XviD-LOL")]
|
[TestCase("Pulp.Fiction.1994.Polish.1080p.XviD-LOL")]
|
||||||
public void should_parse_language_polish(string postTitle)
|
public void should_parse_language_polish(string postTitle)
|
||||||
{
|
{
|
||||||
|
@ -96,6 +96,8 @@ public override bool Equals(object obj)
|
|||||||
public static Language Hebrew => new Language(23, "Hebrew");
|
public static Language Hebrew => new Language(23, "Hebrew");
|
||||||
public static Language Lithuanian => new Language(24, "Lithuanian");
|
public static Language Lithuanian => new Language(24, "Lithuanian");
|
||||||
public static Language Czech => new Language(25, "Czech");
|
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 Any => new Language(-1, "Any");
|
public static Language Any => new Language(-1, "Any");
|
||||||
public static Language Original => new Language(-2, "Original");
|
public static Language Original => new Language(-2, "Original");
|
||||||
|
|
||||||
@ -131,6 +133,8 @@ public static List<Language> All
|
|||||||
Hebrew,
|
Hebrew,
|
||||||
Lithuanian,
|
Lithuanian,
|
||||||
Czech,
|
Czech,
|
||||||
|
Romanian,
|
||||||
|
Hindi,
|
||||||
Any,
|
Any,
|
||||||
Original
|
Original
|
||||||
};
|
};
|
||||||
|
@ -31,7 +31,9 @@ public static class IsoLanguages
|
|||||||
new IsoLanguage("ko", "", "kor", "Korean", Language.Korean),
|
new IsoLanguage("ko", "", "kor", "Korean", Language.Korean),
|
||||||
new IsoLanguage("hu", "", "hun", "Hungarian", Language.Hungarian),
|
new IsoLanguage("hu", "", "hun", "Hungarian", Language.Hungarian),
|
||||||
new IsoLanguage("he", "", "heb", "Hebrew", Language.Hebrew),
|
new IsoLanguage("he", "", "heb", "Hebrew", Language.Hebrew),
|
||||||
new IsoLanguage("cs", "", "ces", "Czech", Language.Czech)
|
new IsoLanguage("cs", "", "ces", "Czech", Language.Czech),
|
||||||
|
new IsoLanguage("hi", "", "hin", "Hindi", Language.Hindi),
|
||||||
|
new IsoLanguage("ro", "", "ron", "Romanian", Language.Romanian)
|
||||||
};
|
};
|
||||||
|
|
||||||
public static IsoLanguage Find(string isoCode)
|
public static IsoLanguage Find(string isoCode)
|
||||||
|
@ -77,6 +77,16 @@ public static List<Language> ParseLanguages(string title)
|
|||||||
languages.Add(Language.Russian);
|
languages.Add(Language.Russian);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (lowerTitle.Contains("romanian"))
|
||||||
|
{
|
||||||
|
languages.Add(Language.Romanian);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lowerTitle.Contains("hindi"))
|
||||||
|
{
|
||||||
|
languages.Add(Language.Hindi);
|
||||||
|
}
|
||||||
|
|
||||||
if (lowerTitle.Contains("polish"))
|
if (lowerTitle.Contains("polish"))
|
||||||
{
|
{
|
||||||
languages.Add(Language.Polish);
|
languages.Add(Language.Polish);
|
||||||
|
Loading…
Reference in New Issue
Block a user