From ceaaec5378aa6a0eae4fa614abaab69deb7175bb Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Fri, 18 Oct 2019 21:00:51 +0200 Subject: [PATCH] New: Parsing Saison season packs as alternative to Season Just because we're in a good mood --- src/NzbDrone.Core.Test/ParserTests/SeasonParserFixture.cs | 2 ++ src/NzbDrone.Core/Parser/Parser.cs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core.Test/ParserTests/SeasonParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/SeasonParserFixture.cs index 70d1a12ca..77b8a3dd2 100644 --- a/src/NzbDrone.Core.Test/ParserTests/SeasonParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/SeasonParserFixture.cs @@ -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); diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index 9cca1cd85..834a6f3d5 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -201,11 +201,11 @@ namespace NzbDrone.Core.Parser RegexOptions.IgnoreCase | RegexOptions.Compiled), //Season only releases - new Regex(@"^(?.+?)\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