Fixed: Parsing of some daily episodes

This commit is contained in:
Mark McDowall 2020-10-18 15:07:14 -07:00
parent a7e9eebfed
commit 51528f63e9
2 changed files with 5 additions and 0 deletions

View File

@ -31,6 +31,7 @@ namespace NzbDrone.Core.Test.ParserTests
[TestCase("20161024- Exotic Payback.21x41_720.mkv", "", 2016, 10, 24)]
[TestCase("2018-11-14.1080.all.mp4", "", 2018, 11, 14)]
[TestCase("2019_08_20_1080_all.mp4", "", 2019, 8, 20)]
[TestCase("Home and Away 20201013 Ep7432 [720p WebRip (x264)] [SUBS]", "Home and Away", 2020, 10, 13)]
//[TestCase("", "", 0, 0, 0)]
public void should_parse_daily_episode(string postTitle, string title, int year, int month, int day)
{

View File

@ -257,6 +257,10 @@ namespace NzbDrone.Core.Parser
new Regex(@"^(?<title>.+?)?\W*(?<airmonth>[0-1][0-9])[-_. ]+(?<airday>[0-3][0-9])[-_. ]+(?<airyear>\d{4})(?!\d+)",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Episodes with airdate (20180428)
new Regex(@"^(?<title>.+?)?\W*(?<!\d+)(?<airyear>\d{4})(?<airmonth>[0-1][0-9])(?<airday>[0-3][0-9])(?!\d+)",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Supports 1103/1113 naming
new Regex(@"^(?<title>.+?)?(?:(?:[-_. ](?<![()\[!]))*(?<season>(?<!\d+|\(|\[|e|x)\d{2})(?<episode>(?<!e|x)\d{2}(?!p|i|\d+|\)|\]|\W\d+|\W(?:e|ep|x)\d+)))+([-_. ]+|$)(?!\\)",
RegexOptions.IgnoreCase | RegexOptions.Compiled),