mirror of
https://github.com/Radarr/Radarr
synced 2026-01-19 14:02:40 +01:00
Fixed: Show rounded age in minimum age rejection message
This commit is contained in:
parent
d8adc3f480
commit
b88d4aad0e
1 changed files with 6 additions and 4 deletions
|
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using NLog;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using NzbDrone.Core.IndexerSearch.Definitions;
|
||||
|
|
@ -29,6 +30,7 @@ public virtual Decision IsSatisfiedBy(RemoteAlbum subject, SearchCriteriaBase se
|
|||
|
||||
var age = subject.Release.AgeMinutes;
|
||||
var minimumAge = _configService.MinimumAge;
|
||||
var ageRounded = Math.Round(age, 1);
|
||||
|
||||
if (minimumAge == 0)
|
||||
{
|
||||
|
|
@ -37,15 +39,15 @@ public virtual Decision IsSatisfiedBy(RemoteAlbum subject, SearchCriteriaBase se
|
|||
}
|
||||
|
||||
|
||||
_logger.Debug("Checking if report meets minimum age requirements. {0}", age);
|
||||
_logger.Debug("Checking if report meets minimum age requirements. {0}", ageRounded);
|
||||
|
||||
if (age < minimumAge)
|
||||
{
|
||||
_logger.Debug("Only {0} minutes old, minimum age is {1} minutes", age, minimumAge);
|
||||
return Decision.Reject("Only {0} minutes old, minimum age is {1} minutes", age, minimumAge);
|
||||
_logger.Debug("Only {0} minutes old, minimum age is {1} minutes", ageRounded, minimumAge);
|
||||
return Decision.Reject("Only {0} minutes old, minimum age is {1} minutes", ageRounded, minimumAge);
|
||||
}
|
||||
|
||||
_logger.Debug("Release is {0} minutes old, greater than minimum age of {1} minutes", age, minimumAge);
|
||||
_logger.Debug("Release is {0} minutes old, greater than minimum age of {1} minutes", ageRounded, minimumAge);
|
||||
|
||||
return Decision.Accept();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue