From b5ce3b277376e9ab6582ef0ab1115f61ea63e969 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 29 Apr 2018 21:56:33 -0700 Subject: [PATCH] Fixed: Improved parsing of iTunes named files --- .../ParserTests/SingleEpisodeParserFixture.cs | 1 + src/NzbDrone.Core/Parser/Parser.cs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/NzbDrone.Core.Test/ParserTests/SingleEpisodeParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/SingleEpisodeParserFixture.cs index b3cd15d59..96dcec933 100644 --- a/src/NzbDrone.Core.Test/ParserTests/SingleEpisodeParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/SingleEpisodeParserFixture.cs @@ -130,6 +130,7 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("Shortland.Street.S26E022.HDTV.x264-FiHTV", "Shortland Street", 26, 22)] [TestCase("Super.Potatoes.S01.Ep06.1080p.BluRay.DTS.x264-MiR", "Super Potatoes", 1, 6)] [TestCase("Room 104 - S01E07 The Missionaries [SDTV]", "Room 104", 1, 7)] + [TestCase("11-02 The Retraction Reaction (HD).m4v", "", 11, 2)] //[TestCase("", "", 0, 0)] public void should_parse_single_episode(string postTitle, string title, int seasonNumber, int episodeNumber) { diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index e7002848b..5a31d6042 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -192,6 +192,10 @@ namespace NzbDrone.Core.Parser new Regex(@"^(?:Season(?:_|-|\s|\.)(?(?(?(?\d{2,3}(?!\d+))))", + RegexOptions.IgnoreCase | RegexOptions.Compiled), + //Anime - Title Absolute Episode Number (e66) new Regex(@"^(?:\[(?.+?)\][-_. ]?)?(?.+?)(?:(?:_|-|\s|\.)+(?:e|ep)(?<absoluteepisode>\d{2,3}))+.*?(?<hash>\[\w{8}\])?(?:$|\.)", RegexOptions.IgnoreCase | RegexOptions.Compiled),