mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
moved config to objectdb.
This commit is contained in:
parent
65061cdc96
commit
13658e3c6d
88 changed files with 627 additions and 586 deletions
|
@ -1,5 +1,6 @@
|
|||
using System.Linq;
|
||||
using NLog;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using NzbDrone.Core.Model;
|
||||
using NzbDrone.Core.Providers.Core;
|
||||
|
||||
|
@ -7,12 +8,12 @@ namespace NzbDrone.Core.DecisionEngine
|
|||
{
|
||||
public class RetentionSpecification
|
||||
{
|
||||
private readonly ConfigProvider _configProvider;
|
||||
private readonly IConfigService _configService;
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public RetentionSpecification(ConfigProvider configProvider)
|
||||
public RetentionSpecification(IConfigService configService)
|
||||
{
|
||||
_configProvider = configProvider;
|
||||
_configService = configService;
|
||||
}
|
||||
|
||||
public RetentionSpecification()
|
||||
|
@ -23,7 +24,7 @@ namespace NzbDrone.Core.DecisionEngine
|
|||
public virtual bool IsSatisfiedBy(EpisodeParseResult subject)
|
||||
{
|
||||
logger.Trace("Checking if report meets retention requirements. {0}", subject.Age);
|
||||
if (_configProvider.Retention > 0 && subject.Age > _configProvider.Retention)
|
||||
if (_configService.Retention > 0 && subject.Age > _configService.Retention)
|
||||
{
|
||||
logger.Trace("Report age: {0} rejected by user's retention limit", subject.Age);
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue