1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/NzbDrone.Core/Providers/DecisionEngine/QualityAllowedByProfileSpecification.cs

24 lines
729 B
C#
Raw Normal View History

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