1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-09-20 00:11:46 +02:00
Radarr/NzbDrone.Core/DecisionEngine/QualityAllowedByProfileSpecification.cs

24 lines
715 B
C#
Raw Normal View History

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