mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
New: Added Arabic language
This commit is contained in:
parent
33b708927c
commit
f8b8afdaa2
@ -232,6 +232,13 @@ public void should_parse_language_czech(string postTitle)
|
||||
result.Language.Id.Should().Be(Language.Czech.Id);
|
||||
}
|
||||
|
||||
[TestCase("Antinormal.S01.ARABIC.COMPLETE.720p.NF.WEBRip.x264-PTV")]
|
||||
public void should_parse_language_arabic(string postTitle)
|
||||
{
|
||||
var result = Parser.Parser.ParseTitle(postTitle);
|
||||
result.Language.Id.Should().Be(Language.Arabic.Id);
|
||||
}
|
||||
|
||||
[TestCase("Russian.Puppets.S01E07.Cold.Action.HDTV.XviD-Droned")]
|
||||
[TestCase("Russian.Puppets.S01E07E08.Cold.Action.HDTV.XviD-Droned")]
|
||||
[TestCase("Russian.Puppets.S01.1080p.WEBRip.DDP5.1.x264-Drone")]
|
||||
|
@ -81,8 +81,9 @@ public override bool Equals(object obj)
|
||||
public static Language Hebrew { get { return new Language(23, "Hebrew"); } }
|
||||
public static Language Lithuanian { get { return new Language(24, "Lithuanian"); } }
|
||||
public static Language Czech { get { return new Language(25, "Czech"); } }
|
||||
public static Language Arabic { get { return new Language(26, "Arabic"); } }
|
||||
|
||||
|
||||
|
||||
public static List<Language> All
|
||||
{
|
||||
get
|
||||
@ -114,7 +115,8 @@ public static List<Language> All
|
||||
Hungarian,
|
||||
Hebrew,
|
||||
Lithuanian,
|
||||
Czech
|
||||
Czech,
|
||||
Arabic
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,8 @@ public static class IsoLanguages
|
||||
new IsoLanguage("hu", "hun", Language.Hungarian),
|
||||
new IsoLanguage("he", "heb", Language.Hebrew),
|
||||
new IsoLanguage("lt", "lit", Language.Lithuanian),
|
||||
new IsoLanguage("cs", "ces", Language.Czech)
|
||||
new IsoLanguage("cs", "ces", Language.Czech),
|
||||
new IsoLanguage("ar", "ara", Language.Arabic)
|
||||
};
|
||||
|
||||
public static IsoLanguage Find(string isoCode)
|
||||
|
@ -93,6 +93,9 @@ public static Language ParseLanguage(string title, bool defaultToEnglish = true)
|
||||
if (lowerTitle.Contains("hebrew"))
|
||||
return Language.Hebrew;
|
||||
|
||||
if (lowerTitle.Contains("arabic"))
|
||||
return Language.Arabic;
|
||||
|
||||
var regexLanguage = RegexLanguage(title);
|
||||
|
||||
if (regexLanguage != Language.Unknown)
|
||||
|
Loading…
Reference in New Issue
Block a user