Radarr/NzbDrone.Core/Providers/DecisionEngine/QualityAllowedByProfileSpec...

24 lines
725 B
C#
Raw Normal View History

using System.Linq;
using NLog;
using NzbDrone.Core.Model;
namespace NzbDrone.Core.Providers.DecisionEngine
{
2012-04-15 01:09:51 +00:00
public class QualityAllowedByProfileSpecification
{
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
2012-04-15 01:09:51 +00:00
public virtual bool IsSatisfiedBy(EpisodeParseResult subject)
{
2012-04-15 01:09:51 +00:00
logger.Trace("Checking if report meets quality requirements. {0}", subject.Quality);
2012-10-14 00:36:16 +00:00
if (!subject.Series.QualityProfile.Allowed.Contains(subject.Quality.Quality))
{
2012-04-15 01:09:51 +00:00
logger.Trace("Quality {0} rejected by Series' quality profile", subject.Quality);
return false;
}
return true;
}
}
}