Fixed: Wrongly parsing language in series title for season packs (episodes were already handled)
This commit is contained in:
parent
5497b68a98
commit
fcdd0f21c7
|
@ -228,6 +228,8 @@ namespace NzbDrone.Core.Test.ParserTests
|
||||||
|
|
||||||
|
|
||||||
[TestCase("Russian.Puppets.S01E07.Cold.Action.HDTV.XviD-Droned")]
|
[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)
|
public void should_not_parse_series_or_episode_title(string postTitle)
|
||||||
{
|
{
|
||||||
var result = Parser.Parser.ParseTitle(postTitle);
|
var result = Parser.Parser.ParseTitle(postTitle);
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace NzbDrone.Core.Parser
|
||||||
|
|
||||||
private static readonly RegexReplace[] CleanSeriesTitleRegex = new[]
|
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)\]|简|繁|字幕)",
|
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)\]|简|繁|字幕)",
|
||||||
|
|
Loading…
Reference in New Issue