New: Parsing Saison season packs as alternative to Season

Just because we're in a good mood
This commit is contained in:
Taloth Saldono 2019-10-18 21:00:51 +02:00
parent e49a3e7206
commit ceaaec5378
2 changed files with 4 additions and 2 deletions

View File

@ -24,6 +24,8 @@ namespace NzbDrone.Core.Test.ParserTests
[TestCase("Fleming.S01.720p.WEBDL.DD5.1.H.264-NTb", "Fleming", 1)]
[TestCase("Holmes.Makes.It.Right.S02.720p.HDTV.AAC5.1.x265-NOGRP", "Holmes Makes It Right", 2)]
[TestCase("My.Series.S2014.720p.HDTV.x264-ME", "My Series", 2014)]
[TestCase("Velvet.Saison3.VOSTFR.HDTV.XviD-NOTAG", "Velvet", 3)]
[TestCase("Watatatov.SAISON.1.VFQ.PDTV.H264-ACC-ROLLED", "Watatatov", 1)]
public void should_parse_full_season_release(string postTitle, string title, int season)
{
var result = Parser.Parser.ParseTitle(postTitle);

View File

@ -201,11 +201,11 @@ namespace NzbDrone.Core.Parser
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Season only releases
new Regex(@"^(?<title>.+?)\W(?:S|Season)\W?(?<season>\d{1,2}(?!\d+))(\W+|_|$)(?<extras>EXTRAS|SUBPACK)?(?!\\)",
new Regex(@"^(?<title>.+?)\W(?:S|Season|Saison)\W?(?<season>\d{1,2}(?!\d+))(\W+|_|$)(?<extras>EXTRAS|SUBPACK)?(?!\\)",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//4 digit season only releases
new Regex(@"^(?<title>.+?)\W(?:S|Season)\W?(?<season>\d{4}(?!\d+))(\W+|_|$)(?<extras>EXTRAS|SUBPACK)?(?!\\)",
new Regex(@"^(?<title>.+?)\W(?:S|Season|Saison)\W?(?<season>\d{4}(?!\d+))(\W+|_|$)(?<extras>EXTRAS|SUBPACK)?(?!\\)",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Episodes with a title and season/episode in square brackets