mirror of https://github.com/lidarr/Lidarr
Fixed: Season packs will no longer be grabbed if it contains an unmonitored episode.
This commit is contained in:
parent
74ad841be4
commit
d1ce1bf218
|
@ -91,17 +91,17 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
}
|
||||
|
||||
[Test]
|
||||
public void only_first_episode_not_monitored_should_return_monitored()
|
||||
public void only_first_episode_not_monitored_should_return_false()
|
||||
{
|
||||
WithFirstEpisodeUnmonitored();
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultMulti, null).Accepted.Should().BeTrue();
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultMulti, null).Accepted.Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void only_second_episode_not_monitored_should_return_monitored()
|
||||
public void only_second_episode_not_monitored_should_return_false()
|
||||
{
|
||||
WithSecondEpisodeUnmonitored();
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultMulti, null).Accepted.Should().BeTrue();
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultMulti, null).Accepted.Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
|
@ -33,13 +33,13 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
|
|||
return Decision.Reject("Series is not monitored");
|
||||
}
|
||||
|
||||
//return monitored if any of the episodes are monitored
|
||||
if (subject.Episodes.Any(episode => episode.Monitored))
|
||||
var monitoredCount = subject.Episodes.Count(episode => episode.Monitored);
|
||||
if (monitoredCount == subject.Episodes.Count)
|
||||
{
|
||||
return Decision.Accept();
|
||||
}
|
||||
|
||||
_logger.Debug("No episodes are monitored. skipping.");
|
||||
_logger.Debug("Only {0}/{1} episodes are monitored. skipping.", monitoredCount, subject.Episodes);
|
||||
return Decision.Reject("Episode is not monitored");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue