Fixed: Parsing separated season and episode numbers (S01 - E01)
Closes #1320
This commit is contained in:
parent
b9d67ae421
commit
c25bea6470
|
@ -120,6 +120,7 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
[TestCase("Ken.Burns.The.Civil.War.5of9.The.Universe.Of.Battle.1990.DVDRip.x264-HANDJOB", "Ken Burns The Civil War", 1, 5)]
|
||||
[TestCase("Judge Judy 2016 02 25 S20E142", "Judge Judy", 20, 142)]
|
||||
[TestCase("Judge Judy 2016 02 25 S20E143", "Judge Judy", 20, 143)]
|
||||
[TestCase("Red Dwarf - S02 - E06 - Parallel Universe", "Red Dwarf", 2, 6)]
|
||||
//[TestCase("", "", 0, 0)]
|
||||
public void should_parse_single_episode(string postTitle, string title, int seasonNumber, int episodeNumber)
|
||||
{
|
||||
|
|
|
@ -114,6 +114,10 @@ namespace NzbDrone.Core.Parser
|
|||
new Regex(@"^(?:(?<title>.+?)(?:_|-|\s|\.)+)(?:S?(?<season>(?<!\d+)\d{1,2}(?!\d+)))(?:(?:[-_. ]{1,3}ep){1,2}(?<episode>(?<!\d+)\d{5}(?!\d+)))+",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
||||
|
||||
// Separated season and episode numbers S01 - E01
|
||||
new Regex(@"^(?<title>.+?)\WS(?<season>\d{2}(?!\d+))(\W-\W)E(?<episode>(?<!\d+)\d{2}(?!\d+))(?!\\)",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
||||
|
||||
//Season only releases
|
||||
new Regex(@"^(?<title>.+?)\W(?:S|Season)\W?(?<season>\d{1,2}(?!\d+))(\W+|_|$)(?<extras>EXTRAS|SUBPACK)?(?!\\)",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
||||
|
|
Loading…
Reference in New Issue