From ba447c93e363475dc90ceea3c0a274f7d0845f96 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Sun, 29 Oct 2023 00:52:13 +0300 Subject: [PATCH] Fixed: DVDRip/DVDRemux being treated as full disk releases Closes #6134 --- .../DecisionEngineTests/RawDiskSpecificationFixture.cs | 8 ++++++++ .../DecisionEngine/Specifications/RawDiskSpecification.cs | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core.Test/DecisionEngineTests/RawDiskSpecificationFixture.cs b/src/NzbDrone.Core.Test/DecisionEngineTests/RawDiskSpecificationFixture.cs index 1ac77bee8..9831d1fea 100644 --- a/src/NzbDrone.Core.Test/DecisionEngineTests/RawDiskSpecificationFixture.cs +++ b/src/NzbDrone.Core.Test/DecisionEngineTests/RawDiskSpecificationFixture.cs @@ -86,5 +86,13 @@ namespace NzbDrone.Core.Test.DecisionEngineTests _remoteEpisode.Release.Title = title; Subject.IsSatisfiedBy(_remoteEpisode, null).Accepted.Should().BeFalse(); } + + [TestCase("Series Title EP50 USLT NTSC DVDRemux DD2.0")] + [TestCase("Series.Title.S01.NTSC.DVDRip.DD2.0.x264-PLAiD")] + public void should_return_true_if_dvdrip(string title) + { + _remoteEpisode.Release.Title = title; + Subject.IsSatisfiedBy(_remoteEpisode, null).Accepted.Should().BeTrue(); + } } } diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/RawDiskSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/RawDiskSpecification.cs index 80c40c95e..e62e68edc 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/RawDiskSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/RawDiskSpecification.cs @@ -13,7 +13,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications { new Regex(@"(?:dis[ck])(?:[-_. ]\d+[-_. ])(?:(?:(?:480|720|1080|2160)[ip]|)[-_. ])?(?:Blu\-?ray)", RegexOptions.Compiled | RegexOptions.IgnoreCase), new Regex(@"(?:(?:480|720|1080|2160)[ip]|)[-_. ](?:full)[-_. ](?:Blu\-?ray)", RegexOptions.Compiled | RegexOptions.IgnoreCase), - new Regex(@"(?:\d?x?M?DVD-?[R59])", RegexOptions.Compiled | RegexOptions.IgnoreCase) + new Regex(@"(?:\d?x?M?DVD-?[R59])[ ._]", RegexOptions.Compiled | RegexOptions.IgnoreCase) }; private static readonly string[] _dvdContainerTypes = new[] { "vob", "iso" };