New: Parse Spanish language using Castellano and Español

Closes #3579
This commit is contained in:
Mark McDowall 2022-04-24 17:14:38 -07:00
parent 82646db70d
commit f6664b8b42
2 changed files with 5 additions and 0 deletions

View File

@ -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);

View File

@ -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;
}
}