From 5834afe30b8a0f252d60a17cf71f0f41b17aeecc Mon Sep 17 00:00:00 2001 From: Qstick Date: Sat, 5 Mar 2022 11:36:28 -0600 Subject: [PATCH] SimpleTitleRegex catchup Fixes #7104 Fixes #5926 Fixes #6784 Closes #7105 Co-Authored-By: Mark McDowall Co-Authored-By: Taloth --- src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs | 4 ++-- src/NzbDrone.Core/Parser/Parser.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs index 8ca559812..8543ca24e 100644 --- a/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs @@ -46,12 +46,12 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("A.I.Artificial.Movie.(2001)", "A.I. Artificial Movie")] [TestCase("A.Movie.Name.(1998)", "A Movie Name")] [TestCase("www.Torrenting.com - Movie.2008.720p.X264-DIMENSION", "Movie")] - [TestCase("Movie: The Movie World 2013", "Movie The Movie World")] + [TestCase("Movie: The Movie World 2013", "Movie: The Movie World")] [TestCase("Movie.The.Final.Chapter.2016", "Movie The Final Chapter")] [TestCase("Der.Movie.James.German.Bluray.FuckYou.Pso.Why.cant.you.follow.scene.rules.1998", "Der Movie James")] [TestCase("Movie.German.DL.AC3.Dubbed..BluRay.x264-PsO", "Movie")] [TestCase("Valana la Movie TRUEFRENCH BluRay 720p 2016 kjhlj", "Valana la Movie")] - [TestCase("Mission Movie: Rogue Movie (2015)�[XviD - Ita Ac3 - SoftSub Ita]azione, spionaggio, thriller *Prima Visione* Team mulnic Tom Cruise", "Mission Movie Rogue Movie")] + [TestCase("Mission Movie: Rogue Movie (2015)�[XviD - Ita Ac3 - SoftSub Ita]azione, spionaggio, thriller *Prima Visione* Team mulnic Tom Cruise", "Mission Movie: Rogue Movie")] [TestCase("Movie.Movie.2000.FRENCH..BluRay.-AiRLiNE", "Movie Movie")] [TestCase("My Movie 1999 German Bluray", "My Movie")] [TestCase("Leaving Movie by Movie (1897) [DVD].mp4", "Leaving Movie by Movie")] diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index 024b1ecf0..6af0f9d35 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -97,7 +97,7 @@ namespace NzbDrone.Core.Parser private static readonly Regex ReportImdbId = new Regex(@"(?tt\d{7,8})", RegexOptions.IgnoreCase | RegexOptions.Compiled); private static readonly Regex ReportTmdbId = new Regex(@"tmdb(id)?-(?\d+)", RegexOptions.IgnoreCase | RegexOptions.Compiled); - private static readonly RegexReplace SimpleTitleRegex = new RegexReplace(@"\s*(?:480[ip]|576[ip]|720[ip]|1080[ip]|2160[ip]|[xh][\W_]?26[45]|DD\W?5\W1|[<>?*:|]|848x480|1280x720|1920x1080|(8|10)b(it)?)", + private static readonly RegexReplace SimpleTitleRegex = new RegexReplace(@"(?:(480|540|720|1080|2160)[ip]|[xh][\W_]?26[45]|DD\W?5\W1|[<>?*]|848x480|1280x720|1920x1080|3840x2160|4096x2160|(8|10)b(it)?|10-bit)\s*?", string.Empty, RegexOptions.IgnoreCase | RegexOptions.Compiled);