From 29ed3293d13f7183602266d996a3cf67d49e5fc6 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 1 Jul 2013 21:57:49 -0700 Subject: [PATCH] Made Nzb Restrictions case-insensative --- .../DecisionEngineTests/NotRestrictedNzbSpecificationFixture.cs | 2 ++ .../Specifications/NotRestrictedNzbSpecification.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NzbDrone.Core.Test/DecisionEngineTests/NotRestrictedNzbSpecificationFixture.cs b/NzbDrone.Core.Test/DecisionEngineTests/NotRestrictedNzbSpecificationFixture.cs index ed1de251d..7c7946337 100644 --- a/NzbDrone.Core.Test/DecisionEngineTests/NotRestrictedNzbSpecificationFixture.cs +++ b/NzbDrone.Core.Test/DecisionEngineTests/NotRestrictedNzbSpecificationFixture.cs @@ -32,7 +32,9 @@ public void should_be_true_when_restrictions_are_empty() [TestCase("KYR")] [TestCase("EDITED")] + [TestCase("edited")] [TestCase("2HD\nKYR")] + [TestCase("2HD\nkyr")] public void should_be_false_when_nzb_contains_a_restricted_term(string restrictions) { Mocker.GetMock().SetupGet(c => c.NzbRestrictions).Returns(restrictions); diff --git a/NzbDrone.Core/DecisionEngine/Specifications/NotRestrictedNzbSpecification.cs b/NzbDrone.Core/DecisionEngine/Specifications/NotRestrictedNzbSpecification.cs index ad6bcdaa5..a024a30b8 100644 --- a/NzbDrone.Core/DecisionEngine/Specifications/NotRestrictedNzbSpecification.cs +++ b/NzbDrone.Core/DecisionEngine/Specifications/NotRestrictedNzbSpecification.cs @@ -43,7 +43,7 @@ public virtual bool IsSatisfiedBy(RemoteEpisode subject) foreach (var restriction in restrictions) { - if (subject.Report.Title.Contains(restriction)) + if (subject.Report.Title.ToLowerInvariant().Contains(restriction.ToLowerInvariant())) { _logger.Trace("{0} is restricted: {1}", subject, restriction); return false;