1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-22 22:15:17 -04:00

Cutoff moved to its own spec

This commit is contained in:
Mark McDowall
2013-09-10 19:07:22 -07:00
parent 92cc41edeb
commit 33fa468f91
9 changed files with 66 additions and 16 deletions
@@ -0,0 +1,37 @@
using System.Collections.Generic;
using System.Linq;
using NzbDrone.Core.Parser.Model;
namespace NzbDrone.Core.DecisionEngine
{
public class DownloadDecision
{
public RemoteEpisode RemoteEpisode { get; private set; }
public IEnumerable<string> Rejections { get; private set; }
public bool Approved
{
get
{
return !Rejections.Any();
}
}
public DownloadDecision(RemoteEpisode episode, params string[] rejections)
{
RemoteEpisode = episode;
Rejections = rejections.ToList();
}
public override string ToString()
{
if (Approved)
{
return "[OK] " + RemoteEpisode;
}
return "[Rejected " + Rejections.Count() + "]" + RemoteEpisode;
}
}
}