Fixed: File names and release titles lacking a series title and starting with the Air date.
fixes #2825
This commit is contained in:
parent
ae6d920e2a
commit
9f16d9b2fc
|
@ -28,6 +28,8 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
//[TestCase("Corrie.07.01.15", "Corrie", 2015, 1, 7)]
|
||||
[TestCase("The Nightly Show with Larry Wilmore 2015 02 09 WEBRIP s01e13", "The Nightly Show with Larry Wilmore", 2015, 2, 9)]
|
||||
[TestCase("Jimmy_Fallon_2018_06_22_Seth_Meyers_720p_HEVC_x265-MeGusta", "Jimmy Fallon", 2018, 6, 22)]
|
||||
[TestCase("20161024- Exotic Payback.21x41_720.mkv", "", 2016, 10, 24)]
|
||||
[TestCase("2018-11-14.1080.all.mp4", "", 2018, 11, 14)]
|
||||
//[TestCase("", "", 0, 0, 0)]
|
||||
public void should_parse_daily_episode(string postTitle, string title, int year, int month, int day)
|
||||
{
|
||||
|
|
|
@ -22,6 +22,10 @@ namespace NzbDrone.Core.Parser
|
|||
// new Regex(@"^(?:(?<absoluteepisode>\d{2,3})(?:_|-|\s|\.)+)+(?<title>.+?)(?:\W|_)+(?:S?(?<season>(?<!\d+)\d{1,2}(?!\d+))(?:(?:\-|[ex]|\W[ex]){1,2}(?<episode>\d{2}(?!\d+)))+)",
|
||||
// RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
||||
|
||||
//Daily episodes without title (2018-10-12, 20181012) (Strict pattern to avoid false matches)
|
||||
new Regex(@"^(?<airyear>19[6-9]\d|20\d\d)(?<sep>[-]?)(?<airmonth>0\d|1[0-2])\k<sep>(?<airday>[0-2]\d|3[01])(?!\d)",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
||||
|
||||
//Multi-Part episodes without a title (S01E05.S01E06)
|
||||
new Regex(@"^(?:\W*S?(?<season>(?<!\d+)(?:\d{1,2}|\d{4})(?!\d+))(?:(?:[ex]){1,2}(?<episode>\d{1,3}(?!\d+)))+){2,}",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
||||
|
|
Loading…
Reference in New Issue