mirror of
https://github.com/Radarr/Radarr.git
synced 2026-03-05 13:21:25 -05:00
@@ -71,6 +71,8 @@ namespace NzbDrone.Core.Test.ParserTests
|
||||
[TestCase("Movie Title (2020)[BDRemux AVC 1080p][E-AC3 DD Plus 5.1 Castellano-Inglés Subs]")]
|
||||
[TestCase("Movie Title (2020) [UHDRemux2160p HDR][DTS-HD MA 5.1 AC3 5.1 Castellano - True-HD 7.1 Atmos Inglés Subs]")]
|
||||
[TestCase("Movie Title (2016) [UHDRemux 2160p SDR] [Castellano DD 5.1 - Inglés DTS-HD MA 5.1 Subs]")]
|
||||
[TestCase("Movie Title 2022 [HDTV 720p][Cap.101][AC3 5.1 Castellano][www.pctnew.ORG]")]
|
||||
[TestCase("Movie Title 2022 [HDTV 720p][Cap.206][AC3 5.1 Español Castellano]")]
|
||||
public void should_parse_language_spanish(string postTitle)
|
||||
{
|
||||
var result = Parser.Parser.ParseMovieTitle(postTitle, true);
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace NzbDrone.Core.Parser
|
||||
(?<polish>\b(?:PL\W?DUB|DUB\W?PL|LEK\W?PL|PL\W?LEK)\b)|
|
||||
(?<chinese>\[(?:CH[ST]|BIG5|GB)\]|简|繁|字幕)|
|
||||
(?<ukrainian>(?:(?:\dx)?UKR))|
|
||||
(?<spanish>\b(?:español|castellano)\b)|
|
||||
(?<latvian>\bLV\b)",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled | RegexOptions.IgnorePatternWhitespace);
|
||||
|
||||
@@ -55,7 +56,7 @@ namespace NzbDrone.Core.Parser
|
||||
languages.Add(Language.French);
|
||||
}
|
||||
|
||||
if (lowerTitle.Contains("spanish") || lowerTitle.Contains("castellano"))
|
||||
if (lowerTitle.Contains("spanish"))
|
||||
{
|
||||
languages.Add(Language.Spanish);
|
||||
}
|
||||
@@ -297,6 +298,11 @@ namespace NzbDrone.Core.Parser
|
||||
languages.Add(Language.Chinese);
|
||||
}
|
||||
|
||||
if (match.Groups["spanish"].Success)
|
||||
{
|
||||
languages.Add(Language.Spanish);
|
||||
}
|
||||
|
||||
if (match.Groups["ukrainian"].Success)
|
||||
{
|
||||
languages.Add(Language.Ukrainian);
|
||||
|
||||
Reference in New Issue
Block a user