mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
MonitoredSpec does not apply to searching
Fixed an issue where search specs weren't applied
This commit is contained in:
parent
cd7a8bae78
commit
f9092e95c2
@ -68,7 +68,7 @@ public void IsAcceptableSize_true_single_episode_not_first_or_last_30_minute()
|
||||
.Returns(false);
|
||||
|
||||
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle);
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle, null);
|
||||
|
||||
|
||||
result.Should().BeTrue();
|
||||
@ -87,7 +87,7 @@ public void IsAcceptableSize_true_single_episode_not_first_or_last_60_minute()
|
||||
.Returns(false);
|
||||
|
||||
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle);
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle, null);
|
||||
|
||||
|
||||
result.Should().BeTrue();
|
||||
@ -106,7 +106,7 @@ public void IsAcceptableSize_false_single_episode_not_first_or_last_30_minute()
|
||||
.Returns(false);
|
||||
|
||||
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle);
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle, null);
|
||||
|
||||
|
||||
result.Should().BeFalse();
|
||||
@ -115,8 +115,6 @@ public void IsAcceptableSize_false_single_episode_not_first_or_last_30_minute()
|
||||
[Test]
|
||||
public void IsAcceptableSize_false_single_episode_not_first_or_last_60_minute()
|
||||
{
|
||||
|
||||
|
||||
parseResultSingle.Series = series60minutes;
|
||||
parseResultSingle.Report.Size = 1.Gigabytes();
|
||||
|
||||
@ -126,9 +124,7 @@ public void IsAcceptableSize_false_single_episode_not_first_or_last_60_minute()
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>()))
|
||||
.Returns(false);
|
||||
|
||||
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle);
|
||||
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle, null);
|
||||
|
||||
result.Should().BeFalse();
|
||||
}
|
||||
@ -136,8 +132,6 @@ public void IsAcceptableSize_false_single_episode_not_first_or_last_60_minute()
|
||||
[Test]
|
||||
public void IsAcceptableSize_true_multi_episode_not_first_or_last_30_minute()
|
||||
{
|
||||
|
||||
|
||||
parseResultMulti.Series = series30minutes;
|
||||
parseResultMulti.Report.Size = 184572800;
|
||||
|
||||
@ -148,7 +142,7 @@ public void IsAcceptableSize_true_multi_episode_not_first_or_last_30_minute()
|
||||
.Returns(false);
|
||||
|
||||
|
||||
bool result = Subject.IsSatisfiedBy(parseResultMulti);
|
||||
bool result = Subject.IsSatisfiedBy(parseResultMulti, null);
|
||||
|
||||
|
||||
result.Should().BeTrue();
|
||||
@ -157,8 +151,6 @@ public void IsAcceptableSize_true_multi_episode_not_first_or_last_30_minute()
|
||||
[Test]
|
||||
public void IsAcceptableSize_true_multi_episode_not_first_or_last_60_minute()
|
||||
{
|
||||
|
||||
|
||||
parseResultMulti.Series = series60minutes;
|
||||
parseResultMulti.Report.Size = 368572800;
|
||||
|
||||
@ -169,7 +161,7 @@ public void IsAcceptableSize_true_multi_episode_not_first_or_last_60_minute()
|
||||
.Returns(false);
|
||||
|
||||
|
||||
bool result = Subject.IsSatisfiedBy(parseResultMulti);
|
||||
bool result = Subject.IsSatisfiedBy(parseResultMulti, null);
|
||||
|
||||
|
||||
result.Should().BeTrue();
|
||||
@ -178,8 +170,6 @@ public void IsAcceptableSize_true_multi_episode_not_first_or_last_60_minute()
|
||||
[Test]
|
||||
public void IsAcceptableSize_false_multi_episode_not_first_or_last_30_minute()
|
||||
{
|
||||
|
||||
|
||||
parseResultMulti.Series = series30minutes;
|
||||
parseResultMulti.Report.Size = 1.Gigabytes();
|
||||
|
||||
@ -190,7 +180,7 @@ public void IsAcceptableSize_false_multi_episode_not_first_or_last_30_minute()
|
||||
.Returns(false);
|
||||
|
||||
|
||||
bool result = Subject.IsSatisfiedBy(parseResultMulti);
|
||||
bool result = Subject.IsSatisfiedBy(parseResultMulti, null);
|
||||
|
||||
|
||||
result.Should().BeFalse();
|
||||
@ -199,8 +189,6 @@ public void IsAcceptableSize_false_multi_episode_not_first_or_last_30_minute()
|
||||
[Test]
|
||||
public void IsAcceptableSize_false_multi_episode_not_first_or_last_60_minute()
|
||||
{
|
||||
|
||||
|
||||
parseResultMulti.Series = series60minutes;
|
||||
parseResultMulti.Report.Size = 10.Gigabytes();
|
||||
|
||||
@ -211,7 +199,7 @@ public void IsAcceptableSize_false_multi_episode_not_first_or_last_60_minute()
|
||||
.Returns(false);
|
||||
|
||||
|
||||
bool result = Subject.IsSatisfiedBy(parseResultMulti);
|
||||
bool result = Subject.IsSatisfiedBy(parseResultMulti, null);
|
||||
|
||||
|
||||
result.Should().BeFalse();
|
||||
@ -220,8 +208,6 @@ public void IsAcceptableSize_false_multi_episode_not_first_or_last_60_minute()
|
||||
[Test]
|
||||
public void IsAcceptableSize_true_single_episode_first_30_minute()
|
||||
{
|
||||
|
||||
|
||||
parseResultSingle.Series = series30minutes;
|
||||
parseResultSingle.Report.Size = 184572800;
|
||||
|
||||
@ -232,7 +218,7 @@ public void IsAcceptableSize_true_single_episode_first_30_minute()
|
||||
.Returns(true);
|
||||
|
||||
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle);
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle, null);
|
||||
|
||||
|
||||
result.Should().BeTrue();
|
||||
@ -241,8 +227,6 @@ public void IsAcceptableSize_true_single_episode_first_30_minute()
|
||||
[Test]
|
||||
public void IsAcceptableSize_true_single_episode_first_60_minute()
|
||||
{
|
||||
|
||||
|
||||
parseResultSingle.Series = series60minutes;
|
||||
parseResultSingle.Report.Size = 368572800;
|
||||
|
||||
@ -253,7 +237,7 @@ public void IsAcceptableSize_true_single_episode_first_60_minute()
|
||||
.Returns(true);
|
||||
|
||||
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle);
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle, null);
|
||||
|
||||
|
||||
result.Should().BeTrue();
|
||||
@ -262,8 +246,6 @@ public void IsAcceptableSize_true_single_episode_first_60_minute()
|
||||
[Test]
|
||||
public void IsAcceptableSize_false_single_episode_first_30_minute()
|
||||
{
|
||||
|
||||
|
||||
parseResultSingle.Series = series30minutes;
|
||||
parseResultSingle.Report.Size = 1.Gigabytes();
|
||||
|
||||
@ -274,7 +256,7 @@ public void IsAcceptableSize_false_single_episode_first_30_minute()
|
||||
.Returns(true);
|
||||
|
||||
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle);
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle, null);
|
||||
|
||||
|
||||
result.Should().BeFalse();
|
||||
@ -295,7 +277,7 @@ public void IsAcceptableSize_false_single_episode_first_60_minute()
|
||||
.Returns(true);
|
||||
|
||||
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle);
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle, null);
|
||||
|
||||
|
||||
result.Should().BeFalse();
|
||||
@ -317,7 +299,7 @@ public void IsAcceptableSize_true_unlimited_30_minute()
|
||||
.Returns(true);
|
||||
|
||||
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle);
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle, null);
|
||||
|
||||
|
||||
result.Should().BeTrue();
|
||||
@ -339,7 +321,7 @@ public void IsAcceptableSize_true_unlimited_60_minute()
|
||||
.Returns(true);
|
||||
|
||||
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle);
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle, null);
|
||||
|
||||
|
||||
result.Should().BeTrue();
|
||||
@ -363,7 +345,7 @@ public void IsAcceptableSize_should_treat_daily_series_as_single_episode()
|
||||
.Returns(true);
|
||||
|
||||
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle);
|
||||
bool result = Subject.IsSatisfiedBy(parseResultSingle, null);
|
||||
|
||||
|
||||
result.Should().BeTrue();
|
||||
@ -377,7 +359,7 @@ public void should_return_true_if_RAWHD()
|
||||
ParsedEpisodeInfo = new ParsedEpisodeInfo { Quality = new QualityModel(Quality.RAWHD, false) },
|
||||
};
|
||||
|
||||
Subject.IsSatisfiedBy(parseResult).Should().BeTrue();
|
||||
Subject.IsSatisfiedBy(parseResult, null).Should().BeTrue();
|
||||
}
|
||||
|
||||
|
||||
@ -389,7 +371,7 @@ public void should_always_return_false_if_unknow()
|
||||
ParsedEpisodeInfo = new ParsedEpisodeInfo { Quality = new QualityModel(Quality.Unknown, false) },
|
||||
};
|
||||
|
||||
Subject.IsSatisfiedBy(parseResult).Should().BeFalse();
|
||||
Subject.IsSatisfiedBy(parseResult, null).Should().BeFalse();
|
||||
|
||||
|
||||
Mocker.GetMock<IQualitySizeService>().Verify(c=>c.Get(It.IsAny<int>()),Times.Never());
|
||||
|
@ -37,23 +37,23 @@ public void Setup()
|
||||
_fail2 = new Mock<IDecisionEngineSpecification>();
|
||||
_fail3 = new Mock<IDecisionEngineSpecification>();
|
||||
|
||||
_pass1.Setup(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>())).Returns(true);
|
||||
_pass1.Setup(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>(), null)).Returns(true);
|
||||
_pass1.Setup(c => c.RejectionReason).Returns("_pass1");
|
||||
|
||||
_pass2.Setup(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>())).Returns(true);
|
||||
_pass2.Setup(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>(), null)).Returns(true);
|
||||
_pass2.Setup(c => c.RejectionReason).Returns("_pass2");
|
||||
|
||||
_pass3.Setup(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>())).Returns(true);
|
||||
_pass3.Setup(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>(), null)).Returns(true);
|
||||
_pass3.Setup(c => c.RejectionReason).Returns("_pass3");
|
||||
|
||||
|
||||
_fail1.Setup(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>())).Returns(false);
|
||||
_fail1.Setup(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>(), null)).Returns(false);
|
||||
_fail1.Setup(c => c.RejectionReason).Returns("_fail1");
|
||||
|
||||
_fail2.Setup(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>())).Returns(false);
|
||||
_fail2.Setup(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>(), null)).Returns(false);
|
||||
_fail2.Setup(c => c.RejectionReason).Returns("_fail2");
|
||||
|
||||
_fail3.Setup(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>())).Returns(false);
|
||||
_fail3.Setup(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>(), null)).Returns(false);
|
||||
_fail3.Setup(c => c.RejectionReason).Returns("_fail3");
|
||||
|
||||
_reports = new List<ReportInfo> { new ReportInfo { Title = "The.Office.S03E115.DVDRip.XviD-OSiTV" } };
|
||||
@ -61,7 +61,6 @@ public void Setup()
|
||||
|
||||
Mocker.GetMock<IParsingService>().Setup(c => c.Map(It.IsAny<ParsedEpisodeInfo>()))
|
||||
.Returns(_remoteEpisode);
|
||||
|
||||
}
|
||||
|
||||
private void GivenSpecifications(params Mock<IDecisionEngineSpecification>[] mocks)
|
||||
@ -76,15 +75,14 @@ public void should_call_all_specifications()
|
||||
|
||||
Subject.GetRssDecision(_reports).ToList();
|
||||
|
||||
_fail1.Verify(c => c.IsSatisfiedBy(_remoteEpisode), Times.Once());
|
||||
_fail2.Verify(c => c.IsSatisfiedBy(_remoteEpisode), Times.Once());
|
||||
_fail3.Verify(c => c.IsSatisfiedBy(_remoteEpisode), Times.Once());
|
||||
_pass1.Verify(c => c.IsSatisfiedBy(_remoteEpisode), Times.Once());
|
||||
_pass2.Verify(c => c.IsSatisfiedBy(_remoteEpisode), Times.Once());
|
||||
_pass3.Verify(c => c.IsSatisfiedBy(_remoteEpisode), Times.Once());
|
||||
_fail1.Verify(c => c.IsSatisfiedBy(_remoteEpisode, null), Times.Once());
|
||||
_fail2.Verify(c => c.IsSatisfiedBy(_remoteEpisode, null), Times.Once());
|
||||
_fail3.Verify(c => c.IsSatisfiedBy(_remoteEpisode, null), Times.Once());
|
||||
_pass1.Verify(c => c.IsSatisfiedBy(_remoteEpisode, null), Times.Once());
|
||||
_pass2.Verify(c => c.IsSatisfiedBy(_remoteEpisode, null), Times.Once());
|
||||
_pass3.Verify(c => c.IsSatisfiedBy(_remoteEpisode, null), Times.Once());
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void should_return_rejected_if_single_specs_fail()
|
||||
{
|
||||
@ -124,7 +122,6 @@ public void should_have_same_number_of_rejections_as_specs_that_failed()
|
||||
result.Single().Rejections.Should().HaveCount(3);
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void should_not_attempt_to_map_episode_if_not_parsable()
|
||||
{
|
||||
@ -135,9 +132,9 @@ public void should_not_attempt_to_map_episode_if_not_parsable()
|
||||
|
||||
Mocker.GetMock<IParsingService>().Verify(c => c.Map(It.IsAny<ParsedEpisodeInfo>()), Times.Never());
|
||||
|
||||
_pass1.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>()), Times.Never());
|
||||
_pass2.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>()), Times.Never());
|
||||
_pass3.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>()), Times.Never());
|
||||
_pass1.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>(), null), Times.Never());
|
||||
_pass2.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>(), null), Times.Never());
|
||||
_pass3.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>(), null), Times.Never());
|
||||
|
||||
results.Should().BeEmpty();
|
||||
}
|
||||
@ -151,14 +148,13 @@ [Test] public void should_not_attempt_to_map_episode_series_title_is_blank()
|
||||
|
||||
Mocker.GetMock<IParsingService>().Verify(c => c.Map(It.IsAny<ParsedEpisodeInfo>()), Times.Never());
|
||||
|
||||
_pass1.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>()), Times.Never());
|
||||
_pass2.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>()), Times.Never());
|
||||
_pass3.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>()), Times.Never());
|
||||
_pass1.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>(), null), Times.Never());
|
||||
_pass2.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>(), null), Times.Never());
|
||||
_pass3.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>(), null), Times.Never());
|
||||
|
||||
results.Should().BeEmpty();
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void should_not_attempt_to_make_decision_if_series_is_unknown()
|
||||
{
|
||||
@ -168,13 +164,11 @@ public void should_not_attempt_to_make_decision_if_series_is_unknown()
|
||||
|
||||
Subject.GetRssDecision(_reports);
|
||||
|
||||
_pass1.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>()), Times.Never());
|
||||
_pass2.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>()), Times.Never());
|
||||
_pass3.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>()), Times.Never());
|
||||
|
||||
_pass1.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>(), null), Times.Never());
|
||||
_pass2.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>(), null), Times.Never());
|
||||
_pass3.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>(), null), Times.Never());
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void broken_report_shouldnt_blowup_the_process()
|
||||
{
|
||||
@ -197,7 +191,6 @@ public void broken_report_shouldnt_blowup_the_process()
|
||||
ExceptionVerification.ExpectedErrors(3);
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void should_return_unknown_series_rejection_if_series_is_unknown()
|
||||
{
|
||||
@ -208,8 +201,6 @@ public void should_return_unknown_series_rejection_if_series_is_unknown()
|
||||
var result = Subject.GetRssDecision(_reports);
|
||||
|
||||
result.Should().HaveCount(1);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -40,7 +40,7 @@ public void should_return_true_if_language_is_english()
|
||||
{
|
||||
WithEnglishRelease();
|
||||
|
||||
Mocker.Resolve<LanguageSpecification>().IsSatisfiedBy(parseResult).Should().BeTrue();
|
||||
Mocker.Resolve<LanguageSpecification>().IsSatisfiedBy(parseResult, null).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -48,7 +48,7 @@ public void should_return_false_if_language_is_german()
|
||||
{
|
||||
WithGermanRelease();
|
||||
|
||||
Mocker.Resolve<LanguageSpecification>().IsSatisfiedBy(parseResult).Should().BeFalse();
|
||||
Mocker.Resolve<LanguageSpecification>().IsSatisfiedBy(parseResult, null).Should().BeFalse();
|
||||
}
|
||||
}
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
using FizzWare.NBuilder;
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.DecisionEngine.Specifications;
|
||||
using NzbDrone.Core.DecisionEngine.Specifications.RssSync;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
using NzbDrone.Core.Tv;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
@ -63,50 +63,44 @@ private void WithSecondEpisodeUnmonitored()
|
||||
[Test]
|
||||
public void setup_should_return_monitored_episode_should_return_true()
|
||||
{
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultSingle).Should().BeTrue();
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultMulti).Should().BeTrue();
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultSingle, null).Should().BeTrue();
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultMulti, null).Should().BeTrue();
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void not_monitored_series_should_be_skipped()
|
||||
{
|
||||
_fakeSeries.Monitored = false;
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultMulti).Should().BeFalse();
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultMulti, null).Should().BeFalse();
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void only_episode_not_monitored_should_return_false()
|
||||
{
|
||||
WithFirstEpisodeUnmonitored();
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultSingle).Should().BeFalse();
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultSingle, null).Should().BeFalse();
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void both_episodes_not_monitored_should_return_false()
|
||||
{
|
||||
WithFirstEpisodeUnmonitored();
|
||||
WithSecondEpisodeUnmonitored();
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultMulti).Should().BeFalse();
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultMulti, null).Should().BeFalse();
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void only_first_episode_not_monitored_should_return_monitored()
|
||||
{
|
||||
WithFirstEpisodeUnmonitored();
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultMulti).Should().BeTrue();
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultMulti, null).Should().BeTrue();
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void only_second_episode_not_monitored_should_return_monitored()
|
||||
{
|
||||
WithSecondEpisodeUnmonitored();
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultMulti).Should().BeTrue();
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultMulti, null).Should().BeTrue();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -27,7 +27,7 @@ public void Setup()
|
||||
[Test]
|
||||
public void should_be_true_when_restrictions_are_empty()
|
||||
{
|
||||
Subject.IsSatisfiedBy(_parseResult).Should().BeTrue();
|
||||
Subject.IsSatisfiedBy(_parseResult, null).Should().BeTrue();
|
||||
}
|
||||
|
||||
[TestCase("KYR")]
|
||||
@ -38,7 +38,7 @@ public void should_be_true_when_restrictions_are_empty()
|
||||
public void should_be_false_when_nzb_contains_a_restricted_term(string restrictions)
|
||||
{
|
||||
Mocker.GetMock<IConfigService>().SetupGet(c => c.ReleaseRestrictions).Returns(restrictions);
|
||||
Subject.IsSatisfiedBy(_parseResult).Should().BeFalse();
|
||||
Subject.IsSatisfiedBy(_parseResult, null).Should().BeFalse();
|
||||
}
|
||||
|
||||
[TestCase("NotReal")]
|
||||
@ -47,7 +47,7 @@ public void should_be_false_when_nzb_contains_a_restricted_term(string restricti
|
||||
public void should_be_true_when_nzb_does_not_contain_a_restricted_term(string restrictions)
|
||||
{
|
||||
Mocker.GetMock<IConfigService>().SetupGet(c => c.ReleaseRestrictions).Returns(restrictions);
|
||||
Subject.IsSatisfiedBy(_parseResult).Should().BeTrue();
|
||||
Subject.IsSatisfiedBy(_parseResult, null).Should().BeTrue();
|
||||
}
|
||||
}
|
||||
}
|
@ -51,7 +51,7 @@ public void should_allow_if_quality_is_defined_in_profile(Quality qualityType)
|
||||
remoteEpisode.ParsedEpisodeInfo.Quality.Quality = qualityType;
|
||||
remoteEpisode.Series.QualityProfile.Value.Allowed = new List<Quality> { Quality.DVD, Quality.HDTV720p, Quality.Bluray1080p };
|
||||
|
||||
Subject.IsSatisfiedBy(remoteEpisode).Should().BeTrue();
|
||||
Subject.IsSatisfiedBy(remoteEpisode, null).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test, TestCaseSource("DeniedTestCases")]
|
||||
@ -60,7 +60,7 @@ public void should_not_allow_if_quality_is_not_defined_in_profile(Quality qualit
|
||||
remoteEpisode.ParsedEpisodeInfo.Quality.Quality = qualityType;
|
||||
remoteEpisode.Series.QualityProfile.Value.Allowed = new List<Quality> { Quality.DVD, Quality.HDTV720p, Quality.Bluray1080p };
|
||||
|
||||
Subject.IsSatisfiedBy(remoteEpisode).Should().BeFalse();
|
||||
Subject.IsSatisfiedBy(remoteEpisode, null).Should().BeFalse();
|
||||
}
|
||||
}
|
||||
}
|
@ -50,35 +50,35 @@ private void WithEqualRetention()
|
||||
public void unlimited_retention_should_return_true()
|
||||
{
|
||||
WithUnlimitedRetention();
|
||||
Subject.IsSatisfiedBy(parseResult).Should().BeTrue();
|
||||
Subject.IsSatisfiedBy(parseResult, null).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void longer_retention_should_return_true()
|
||||
{
|
||||
WithLongRetention();
|
||||
Subject.IsSatisfiedBy(parseResult).Should().BeTrue();
|
||||
Subject.IsSatisfiedBy(parseResult, null).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void equal_retention_should_return_true()
|
||||
{
|
||||
WithEqualRetention();
|
||||
Subject.IsSatisfiedBy(parseResult).Should().BeTrue();
|
||||
Subject.IsSatisfiedBy(parseResult, null).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void shorter_retention_should_return_false()
|
||||
{
|
||||
WithShortRetention();
|
||||
Subject.IsSatisfiedBy(parseResult).Should().BeFalse();
|
||||
Subject.IsSatisfiedBy(parseResult, null).Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void zeroDay_report_should_return_true()
|
||||
{
|
||||
WithUnlimitedRetention();
|
||||
Subject.IsSatisfiedBy(parseResult).Should().BeTrue();
|
||||
Subject.IsSatisfiedBy(parseResult, null).Should().BeTrue();
|
||||
}
|
||||
}
|
||||
}
|
@ -70,7 +70,7 @@ private void WithSecondFileUpgradable()
|
||||
public void should_return_true_if_episode_has_no_existing_file()
|
||||
{
|
||||
parseResultSingle.Episodes.ForEach(c => c.EpisodeFileId = 0);
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultSingle).Should().BeTrue();
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultSingle, null).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -78,14 +78,14 @@ public void should_return_true_if_single_episode_doesnt_exist_on_disk()
|
||||
{
|
||||
parseResultSingle.Episodes = new List<Episode>();
|
||||
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultSingle).Should().BeTrue();
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultSingle, null).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_be_upgradable_if_only_episode_is_upgradable()
|
||||
{
|
||||
WithFirstFileUpgradable();
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultSingle).Should().BeTrue();
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultSingle, null).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -93,27 +93,27 @@ public void should_be_upgradable_if_both_episodes_are_upgradable()
|
||||
{
|
||||
WithFirstFileUpgradable();
|
||||
WithSecondFileUpgradable();
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultMulti).Should().BeTrue();
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultMulti, null).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_be_not_upgradable_if_both_episodes_are_not_upgradable()
|
||||
{
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultMulti).Should().BeFalse();
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultMulti, null).Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_be_not_upgradable_if_only_first_episodes_is_upgradable()
|
||||
{
|
||||
WithFirstFileUpgradable();
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultMulti).Should().BeFalse();
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultMulti, null).Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_be_not_upgradable_if_only_second_episodes_is_upgradable()
|
||||
{
|
||||
WithSecondFileUpgradable();
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultMulti).Should().BeFalse();
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultMulti, null).Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -121,28 +121,28 @@ public void should_not_be_upgradable_if_qualities_are_the_same()
|
||||
{
|
||||
firstFile.Quality = new QualityModel(Quality.WEBDL1080p);
|
||||
parseResultSingle.ParsedEpisodeInfo.Quality = new QualityModel(Quality.WEBDL1080p, false);
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultSingle).Should().BeFalse();
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultSingle, null).Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_false_when_episodeFile_was_added_more_than_7_days_ago()
|
||||
{
|
||||
firstFile.DateAdded = DateTime.Today.AddDays(-30);
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultSingle).Should().BeFalse();
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultSingle, null).Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_false_when_first_episodeFile_was_added_more_than_7_days_ago()
|
||||
{
|
||||
firstFile.DateAdded = DateTime.Today.AddDays(-30);
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultMulti).Should().BeFalse();
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultMulti, null).Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_false_when_second_episodeFile_was_added_more_than_7_days_ago()
|
||||
{
|
||||
secondFile.DateAdded = DateTime.Today.AddDays(-30);
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultMulti).Should().BeFalse();
|
||||
_upgradeDisk.IsSatisfiedBy(parseResultMulti, null).Should().BeFalse();
|
||||
}
|
||||
}
|
||||
}
|
@ -80,7 +80,7 @@ private void WithSecondReportUpgradable()
|
||||
public void should_be_upgradable_if_only_episode_is_upgradable()
|
||||
{
|
||||
WithFirstReportUpgradable();
|
||||
_upgradeHistory.IsSatisfiedBy(_parseResultSingle).Should().BeTrue();
|
||||
_upgradeHistory.IsSatisfiedBy(_parseResultSingle, null).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -88,27 +88,27 @@ public void should_be_upgradable_if_both_episodes_are_upgradable()
|
||||
{
|
||||
WithFirstReportUpgradable();
|
||||
WithSecondReportUpgradable();
|
||||
_upgradeHistory.IsSatisfiedBy(_parseResultMulti).Should().BeTrue();
|
||||
_upgradeHistory.IsSatisfiedBy(_parseResultMulti, null).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_not_be_upgradable_if_both_episodes_are_not_upgradable()
|
||||
{
|
||||
_upgradeHistory.IsSatisfiedBy(_parseResultMulti).Should().BeFalse();
|
||||
_upgradeHistory.IsSatisfiedBy(_parseResultMulti, null).Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_be_not_upgradable_if_only_first_episodes_is_upgradable()
|
||||
{
|
||||
WithFirstReportUpgradable();
|
||||
_upgradeHistory.IsSatisfiedBy(_parseResultMulti).Should().BeFalse();
|
||||
_upgradeHistory.IsSatisfiedBy(_parseResultMulti, null).Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_be_not_upgradable_if_only_second_episodes_is_upgradable()
|
||||
{
|
||||
WithSecondReportUpgradable();
|
||||
_upgradeHistory.IsSatisfiedBy(_parseResultMulti).Should().BeFalse();
|
||||
_upgradeHistory.IsSatisfiedBy(_parseResultMulti, null).Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -120,7 +120,7 @@ public void should_not_be_upgradable_if_episode_is_of_same_quality_as_existing()
|
||||
|
||||
Mocker.GetMock<IHistoryService>().Setup(c => c.GetBestQualityInHistory(1)).Returns(_upgradableQuality);
|
||||
|
||||
_upgradeHistory.IsSatisfiedBy(_parseResultSingle).Should().BeFalse();
|
||||
_upgradeHistory.IsSatisfiedBy(_parseResultSingle, null).Should().BeFalse();
|
||||
}
|
||||
}
|
||||
}
|
@ -36,7 +36,7 @@ public List<DownloadDecision> GetRssDecision(IEnumerable<ReportInfo> reports)
|
||||
|
||||
public List<DownloadDecision> GetSearchDecision(IEnumerable<ReportInfo> reports, SearchCriteriaBase searchCriteriaBase)
|
||||
{
|
||||
return GetDecisions(reports).ToList();
|
||||
return GetDecisions(reports, searchCriteriaBase).ToList();
|
||||
}
|
||||
|
||||
private IEnumerable<DownloadDecision> GetDecisions(IEnumerable<ReportInfo> reports, SearchCriteriaBase searchCriteria = null)
|
||||
@ -94,17 +94,8 @@ private string EvaluateSpec(IRejectWithReason spec, RemoteEpisode remoteEpisode,
|
||||
throw new InvalidOperationException("[Need Rejection Text]");
|
||||
}
|
||||
|
||||
var searchSpecification = spec as IDecisionEngineSearchSpecification;
|
||||
if (searchSpecification != null && searchCriteriaBase != null)
|
||||
{
|
||||
if (!searchSpecification.IsSatisfiedBy(remoteEpisode, searchCriteriaBase))
|
||||
{
|
||||
return spec.RejectionReason;
|
||||
}
|
||||
}
|
||||
|
||||
var generalSpecification = spec as IDecisionEngineSpecification;
|
||||
if (generalSpecification != null && !generalSpecification.IsSatisfiedBy(remoteEpisode))
|
||||
if (generalSpecification != null && !generalSpecification.IsSatisfiedBy(remoteEpisode, searchCriteriaBase))
|
||||
{
|
||||
return spec.RejectionReason;
|
||||
}
|
||||
|
@ -1,9 +1,10 @@
|
||||
using NzbDrone.Core.IndexerSearch.Definitions;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
|
||||
namespace NzbDrone.Core.DecisionEngine
|
||||
{
|
||||
public interface IDecisionEngineSpecification : IRejectWithReason
|
||||
{
|
||||
bool IsSatisfiedBy(RemoteEpisode subject);
|
||||
bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteriaBase);
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
using NzbDrone.Core.IndexerSearch.Definitions;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
using NzbDrone.Core.Qualities;
|
||||
using NzbDrone.Core.Tv;
|
||||
@ -24,7 +25,7 @@ public string RejectionReason
|
||||
get { return "File size too big or small"; }
|
||||
}
|
||||
|
||||
public virtual bool IsSatisfiedBy(RemoteEpisode subject)
|
||||
public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteriaBase)
|
||||
{
|
||||
|
||||
_logger.Trace("Beginning size check for: {0}", subject);
|
||||
|
@ -1,4 +1,5 @@
|
||||
using NLog;
|
||||
using NzbDrone.Core.IndexerSearch.Definitions;
|
||||
using NzbDrone.Core.Parser;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
|
||||
@ -21,7 +22,7 @@ public string RejectionReason
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool IsSatisfiedBy(RemoteEpisode subject)
|
||||
public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteriaBase)
|
||||
{
|
||||
_logger.Trace("Checking if report meets language requirements. {0}", subject.ParsedEpisodeInfo.Language);
|
||||
if (subject.ParsedEpisodeInfo.Language != Language.English)
|
||||
|
@ -3,6 +3,7 @@
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
using NzbDrone.Core.Download;
|
||||
using NzbDrone.Core.IndexerSearch.Definitions;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
using NzbDrone.Core.Tv;
|
||||
|
||||
@ -27,7 +28,7 @@ public string RejectionReason
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSatisfiedBy(RemoteEpisode subject)
|
||||
public bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteriaBase)
|
||||
{
|
||||
var downloadClient = _downloadClientProvider.GetDownloadClient();
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using NLog;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using NzbDrone.Core.IndexerSearch.Definitions;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
|
||||
namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
@ -24,7 +25,7 @@ public string RejectionReason
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool IsSatisfiedBy(RemoteEpisode subject)
|
||||
public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteriaBase)
|
||||
{
|
||||
_logger.Trace("Checking if release contains any restricted terms: {0}", subject);
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
using NLog;
|
||||
using NzbDrone.Core.IndexerSearch.Definitions;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
|
||||
namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
@ -20,7 +21,7 @@ public string RejectionReason
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool IsSatisfiedBy(RemoteEpisode subject)
|
||||
public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteriaBase)
|
||||
{
|
||||
_logger.Trace("Checking if report meets quality requirements. {0}", subject.ParsedEpisodeInfo.Quality);
|
||||
if (!subject.Series.QualityProfile.Value.Allowed.Contains(subject.ParsedEpisodeInfo.Quality.Quality))
|
||||
|
@ -1,5 +1,6 @@
|
||||
using NLog;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using NzbDrone.Core.IndexerSearch.Definitions;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
|
||||
namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
@ -24,7 +25,7 @@ public string RejectionReason
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool IsSatisfiedBy(RemoteEpisode subject)
|
||||
public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteriaBase)
|
||||
{
|
||||
var age = subject.Report.Age;
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
using NzbDrone.Core.IndexerSearch.Definitions;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
|
||||
namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
|
||||
{
|
||||
public class MonitoredEpisodeSpecification : IDecisionEngineSpecification
|
||||
{
|
||||
@ -21,8 +22,14 @@ public string RejectionReason
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool IsSatisfiedBy(RemoteEpisode subject)
|
||||
public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteriaBase)
|
||||
{
|
||||
if (searchCriteriaBase != null)
|
||||
{
|
||||
_logger.Trace("Skipping monitored check during search");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!subject.Series.Monitored)
|
||||
{
|
||||
_logger.Debug("{0} is present in the DB but not tracked. skipping.", subject.Series);
|
@ -5,7 +5,7 @@
|
||||
|
||||
namespace NzbDrone.Core.DecisionEngine.Specifications.Search
|
||||
{
|
||||
public class DailyEpisodeMatchSpecification : IDecisionEngineSearchSpecification
|
||||
public class DailyEpisodeMatchSpecification : IDecisionEngineSpecification
|
||||
{
|
||||
private readonly Logger _logger;
|
||||
private readonly IEpisodeService _episodeService;
|
||||
@ -25,6 +25,11 @@ public string RejectionReason
|
||||
}
|
||||
public bool IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteriaBase)
|
||||
{
|
||||
if (searchCriteriaBase == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
var dailySearchSpec = searchCriteriaBase as DailyEpisodeSearchCriteria;
|
||||
|
||||
if (dailySearchSpec == null) return true;
|
||||
|
@ -1,10 +0,0 @@
|
||||
using NzbDrone.Core.IndexerSearch.Definitions;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
|
||||
namespace NzbDrone.Core.DecisionEngine.Specifications.Search
|
||||
{
|
||||
public interface IDecisionEngineSearchSpecification : IRejectWithReason
|
||||
{
|
||||
bool IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteriaBase);
|
||||
}
|
||||
}
|
@ -4,7 +4,7 @@
|
||||
|
||||
namespace NzbDrone.Core.DecisionEngine.Specifications.Search
|
||||
{
|
||||
public class SeasonMatchSpecification : IDecisionEngineSearchSpecification
|
||||
public class SeasonMatchSpecification : IDecisionEngineSpecification
|
||||
{
|
||||
private readonly Logger _logger;
|
||||
|
||||
@ -23,6 +23,11 @@ public string RejectionReason
|
||||
|
||||
public bool IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteriaBase)
|
||||
{
|
||||
if (searchCriteriaBase == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
var singleEpisodeSpec = searchCriteriaBase as SeasonSearchCriteria;
|
||||
if (singleEpisodeSpec == null) return true;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
namespace NzbDrone.Core.DecisionEngine.Specifications.Search
|
||||
{
|
||||
public class SingleEpisodeSearchMatchSpecification : IDecisionEngineSearchSpecification
|
||||
public class SingleEpisodeSearchMatchSpecification : IDecisionEngineSpecification
|
||||
{
|
||||
private readonly Logger _logger;
|
||||
|
||||
@ -24,6 +24,11 @@ public string RejectionReason
|
||||
|
||||
public bool IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteriaBase)
|
||||
{
|
||||
if (searchCriteriaBase == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
var singleEpisodeSpec = searchCriteriaBase as SingleEpisodeSearchCriteria;
|
||||
if (singleEpisodeSpec == null) return true;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
using NzbDrone.Core.IndexerSearch.Definitions;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
|
||||
namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
@ -24,7 +25,7 @@ public string RejectionReason
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool IsSatisfiedBy(RemoteEpisode subject)
|
||||
public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteriaBase)
|
||||
{
|
||||
foreach (var file in subject.Episodes.Where(c => c.EpisodeFileId != 0).Select(c => c.EpisodeFile.Value))
|
||||
{
|
||||
|
@ -1,5 +1,6 @@
|
||||
using NLog;
|
||||
using NzbDrone.Core.History;
|
||||
using NzbDrone.Core.IndexerSearch.Definitions;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
|
||||
namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
@ -25,7 +26,7 @@ public string RejectionReason
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool IsSatisfiedBy(RemoteEpisode subject)
|
||||
public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteriaBase)
|
||||
{
|
||||
foreach (var episode in subject.Episodes)
|
||||
{
|
||||
|
@ -177,12 +177,11 @@
|
||||
<Compile Include="DecisionEngine\Specifications\NotRestrictedReleaseSpecification.cs" />
|
||||
<Compile Include="DecisionEngine\Specifications\Search\SeasonMatchSpecification.cs" />
|
||||
<Compile Include="DecisionEngine\Specifications\Search\DailyEpisodeMatchSpecification.cs" />
|
||||
<Compile Include="DecisionEngine\Specifications\Search\IDecisionEngineSearchSpecification.cs" />
|
||||
<Compile Include="DecisionEngine\Specifications\AcceptableSizeSpecification.cs" />
|
||||
<Compile Include="DecisionEngine\DownloadDecisionMaker.cs" />
|
||||
<Compile Include="DecisionEngine\Specifications\NotInQueueSpecification.cs" />
|
||||
<Compile Include="DecisionEngine\Specifications\LanguageSpecification.cs" />
|
||||
<Compile Include="DecisionEngine\Specifications\MonitoredEpisodeSpecification.cs" />
|
||||
<Compile Include="DecisionEngine\Specifications\RssSync\MonitoredEpisodeSpecification.cs" />
|
||||
<Compile Include="DecisionEngine\Specifications\QualityAllowedByProfileSpecification.cs" />
|
||||
<Compile Include="DecisionEngine\QualityUpgradableSpecification.cs" />
|
||||
<Compile Include="DecisionEngine\Specifications\Search\SingleEpisodeSearchMatchSpecification.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user