From 4a7e5ac06e8e37eca3497d1b05264f582ff1291d Mon Sep 17 00:00:00 2001 From: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Date: Thu, 14 Jan 2021 17:01:20 -0600 Subject: [PATCH] Fixed: Handle more obfuscated names Closes #4198 --- .../ParserTests/HashedReleaseFixture.cs | 14 ++++++++++++++ src/NzbDrone.Core/Parser/Parser.cs | 6 ++++++ 2 files changed, 20 insertions(+) diff --git a/src/NzbDrone.Core.Test/ParserTests/HashedReleaseFixture.cs b/src/NzbDrone.Core.Test/ParserTests/HashedReleaseFixture.cs index a9ccf9485..80541e8f7 100644 --- a/src/NzbDrone.Core.Test/ParserTests/HashedReleaseFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/HashedReleaseFixture.cs @@ -122,6 +122,20 @@ namespace NzbDrone.Core.Test.ParserTests "Series Title", Quality.WEBDL1080p, "NTb" + }, + new object[] + { + @"C:\Test\tv\Series.Title.2017.S04E07.Episode.Name.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTb/s2e2fYzx5xJhuBjHn5ZXE07Ebi.mkv".AsOsAgnostic(), + "Series Title 2017", + Quality.WEBDL1080p, + "NTb" + }, + new object[] + { + @"C:\Test\tv\Series.Title.S04E03.Episode.Name.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTb\zM0vnVU1SoV4uwTihfzTHkYmJPBemgN3MqXG1fY.mkv".AsOsAgnostic(), + "Series Title", + Quality.WEBDL1080p, + "NTb" } }; diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index 3e3312a20..c128c4843 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -349,6 +349,12 @@ namespace NzbDrone.Core.Parser // additional Generic match for mixed-case hashes. - Started appearing Dec 2020 new Regex(@"^[0-9a-zA-Z]{30}", RegexOptions.Compiled), + + // additional Generic match for mixed-case hashes. - Started appearing Jan 2021 + new Regex(@"^[0-9a-zA-Z]{26}", RegexOptions.Compiled), + + // additional Generic match for mixed-case hashes. - Started appearing Jan 2021 + new Regex(@"^[0-9a-zA-Z]{39}", RegexOptions.Compiled), }; private static readonly Regex[] SeasonFolderRegexes = new Regex[]