mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Download decision rejection reasons are no longer static messages
New: Better messaging on manual search when release is rejected
This commit is contained in:
parent
e82b29e346
commit
95d67ef9f4
41 changed files with 265 additions and 378 deletions
|
@ -13,17 +13,9 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
|||
_logger = logger;
|
||||
}
|
||||
|
||||
public string RejectionReason
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Language is not wanted";
|
||||
}
|
||||
}
|
||||
|
||||
public RejectionType Type { get { return RejectionType.Permanent; } }
|
||||
|
||||
public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
|
||||
{
|
||||
var wantedLanguage = subject.Series.Profile.Value.Language;
|
||||
|
||||
|
@ -32,10 +24,10 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
|||
if (subject.ParsedEpisodeInfo.Language != wantedLanguage)
|
||||
{
|
||||
_logger.Debug("Report Language: {0} rejected because it is not wanted, wanted {1}", subject.ParsedEpisodeInfo.Language, wantedLanguage);
|
||||
return false;
|
||||
return Decision.Reject("{0} is wanted, but found {1}", wantedLanguage, subject.ParsedEpisodeInfo.Language);
|
||||
}
|
||||
|
||||
return true;
|
||||
return Decision.Accept();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue