From f6664b8b421fe63a085e7de64a1cc69b97412bb4 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 24 Apr 2022 17:14:38 -0700 Subject: [PATCH] =?UTF-8?q?New:=20Parse=20Spanish=20language=20using=20Cas?= =?UTF-8?q?tellano=20and=20Espa=C3=B1ol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #3579 --- src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs | 2 ++ src/NzbDrone.Core/Parser/LanguageParser.cs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs index 1c8b24191..b2f2a5833 100644 --- a/src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs @@ -65,6 +65,8 @@ namespace NzbDrone.Core.Test.ParserTests } [TestCase("Title.the.Series.2009.S01E14.Spanish.HDTV.XviD-LOL")] + [TestCase("Series Title - Temporada 1 [HDTV 720p][Cap.101][AC3 5.1 Castellano][www.pctnew.ORG]")] + [TestCase("Series Title - Temporada 2 [HDTV 720p][Cap.206][AC3 5.1 EspaƱol Castellano]")] public void should_parse_language_spanish(string postTitle) { var result = LanguageParser.ParseLanguage(postTitle); diff --git a/src/NzbDrone.Core/Parser/LanguageParser.cs b/src/NzbDrone.Core/Parser/LanguageParser.cs index 50a239d78..948a710e0 100644 --- a/src/NzbDrone.Core/Parser/LanguageParser.cs +++ b/src/NzbDrone.Core/Parser/LanguageParser.cs @@ -212,6 +212,9 @@ namespace NzbDrone.Core.Parser if (match.Groups["ukrainian"].Success) return Language.Ukrainian; + if (match.Groups["spanish"].Success) + return Language.Spanish; + return Language.Unknown; } }