From 51528f63e992e5ec99a51b99b924e6340e56f550 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 18 Oct 2020 15:07:14 -0700 Subject: [PATCH] Fixed: Parsing of some daily episodes --- .../ParserTests/DailyEpisodeParserFixture.cs | 1 + src/NzbDrone.Core/Parser/Parser.cs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/NzbDrone.Core.Test/ParserTests/DailyEpisodeParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/DailyEpisodeParserFixture.cs index d5a397132..ebcf55d14 100644 --- a/src/NzbDrone.Core.Test/ParserTests/DailyEpisodeParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/DailyEpisodeParserFixture.cs @@ -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) { diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index 0aa3dbbbe..0e697f4c9 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -257,6 +257,10 @@ namespace NzbDrone.Core.Parser new Regex(@"^(?.+?)?\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),