1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-20 21:55:03 -04:00

Moved Episode Not Requested check to new Specification. Updated tests.

This commit is contained in:
Taloth Saldono
2014-04-01 21:39:17 +02:00
parent 198ff059c4
commit 38b0fae29a
6 changed files with 100 additions and 32 deletions
@@ -97,17 +97,6 @@ namespace NzbDrone.Core.DecisionEngine
if (decision != null)
{
if (searchCriteria != null)
{
var criteriaEpisodes = searchCriteria.Episodes.Select(v => v.Id).ToList();
var remoteEpisodes = decision.RemoteEpisode.Episodes.Select(v => v.Id).ToList();
if (!criteriaEpisodes.Intersect(remoteEpisodes).Any())
{
_logger.Debug("Release rejected since the episode wasn't requested: {0}", decision.RemoteEpisode.ParsedEpisodeInfo);
continue;
}
}
if (decision.Rejections.Any())
{
_logger.Debug("Release rejected for the following reasons: {0}", String.Join(", ", decision.Rejections));