mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-26 17:47:08 +00:00
Fixed: Season packs will no longer be grabbed if it contains an unmonitored episode.
This commit is contained in:
parent
74ad841be4
commit
d1ce1bf218
2 changed files with 7 additions and 7 deletions
|
@ -91,17 +91,17 @@ public void both_episodes_not_monitored_should_return_false()
|
|||
}
|
||||
|
||||
[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 @@ public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase
|
|||
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 a new issue