Fixed: Wrongly parsing language in series title for season packs (episodes were already handled)

This commit is contained in:
Taloth Saldono 2020-03-13 20:18:37 +01:00
parent 5497b68a98
commit fcdd0f21c7
2 changed files with 3 additions and 1 deletions

View File

@ -228,6 +228,8 @@ namespace NzbDrone.Core.Test.ParserTests
[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")]
public void should_not_parse_series_or_episode_title(string postTitle)
{
var result = Parser.Parser.ParseTitle(postTitle);

View File

@ -14,7 +14,7 @@ namespace NzbDrone.Core.Parser
private static readonly RegexReplace[] CleanSeriesTitleRegex = new[]
{
new RegexReplace(@".*?\.(S\d{2}E\d{2,4}\..*)", "$1", RegexOptions.Compiled | RegexOptions.IgnoreCase)
new RegexReplace(@".*?\.(S\d{2}(?:E\d{2,4})*\..*)", "$1", RegexOptions.Compiled | RegexOptions.IgnoreCase)
};
private static readonly Regex LanguageRegex = new Regex(@"(?:\W|_)(?<italian>\b(?:ita|italian)\b)|(?<german>german\b|videomann)|(?<flemish>flemish)|(?<greek>greek)|(?<french>(?:\W|_)(?:FR|VOSTFR)(?:\W|_))|(?<russian>\brus\b)|(?<dutch>nl\W?subs?)|(?<hungarian>\b(?:HUNDUB|HUN)\b)|(?<hebrew>\bHebDub\b)|(?<chinese>\[(?:CH[ST]|BIG5|GB)\]|简|繁|字幕)",