You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
715 B
24 lines
715 B
using System.Linq;
|
|
using NLog;
|
|
using NzbDrone.Core.Model;
|
|
|
|
namespace NzbDrone.Core.DecisionEngine
|
|
{
|
|
public class QualityAllowedByProfileSpecification
|
|
{
|
|
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
|
|
|
public virtual bool IsSatisfiedBy(EpisodeParseResult subject)
|
|
{
|
|
logger.Trace("Checking if report meets quality requirements. {0}", subject.Quality);
|
|
if (!subject.Series.QualityProfile.Allowed.Contains(subject.Quality.Quality))
|
|
{
|
|
logger.Trace("Quality {0} rejected by Series' quality profile", subject.Quality);
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
}
|
|
}
|