1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-09-17 15:02:34 +02:00

Made Nzb Restrictions case-insensative

This commit is contained in:
Mark McDowall 2013-07-01 21:57:49 -07:00
parent d2e771c9f0
commit 29ed3293d1
2 changed files with 3 additions and 1 deletions

View File

@ -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<IConfigService>().SetupGet(c => c.NzbRestrictions).Returns(restrictions);

View File

@ -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;