diff --git a/src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs index 2f76662eb..5812988c2 100644 --- a/src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs @@ -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")] diff --git a/src/NzbDrone.Core/Languages/Language.cs b/src/NzbDrone.Core/Languages/Language.cs index 26bf463a3..8acbe471d 100644 --- a/src/NzbDrone.Core/Languages/Language.cs +++ b/src/NzbDrone.Core/Languages/Language.cs @@ -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 All { get @@ -114,7 +115,8 @@ public static List All Hungarian, Hebrew, Lithuanian, - Czech + Czech, + Arabic }; } } diff --git a/src/NzbDrone.Core/Parser/IsoLanguages.cs b/src/NzbDrone.Core/Parser/IsoLanguages.cs index bb9908295..f9c32cdcc 100644 --- a/src/NzbDrone.Core/Parser/IsoLanguages.cs +++ b/src/NzbDrone.Core/Parser/IsoLanguages.cs @@ -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) diff --git a/src/NzbDrone.Core/Parser/LanguageParser.cs b/src/NzbDrone.Core/Parser/LanguageParser.cs index 9b5ba021a..84ab52561 100644 --- a/src/NzbDrone.Core/Parser/LanguageParser.cs +++ b/src/NzbDrone.Core/Parser/LanguageParser.cs @@ -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)