mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 12:32:31 +01:00
24 lines
715 B
C#
24 lines
715 B
C#
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;
|
|
}
|
|
}
|
|
}
|