mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-21 22:05:38 -04:00
Fixed: Profiles with upgrades disabled incorrectly allowing upgrades in some cases
Closes #4898
This commit is contained in:
@@ -98,7 +98,8 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
|
||||
public bool QualityCutoffNotMet(QualityProfile profile, QualityModel currentQuality, QualityModel newQuality = null)
|
||||
{
|
||||
var cutoffCompare = new QualityModelComparer(profile).Compare(currentQuality.Quality.Id, profile.Cutoff);
|
||||
var cutoff = profile.UpgradeAllowed ? profile.Cutoff : profile.FirststAllowedQuality().Id;
|
||||
var cutoffCompare = new QualityModelComparer(profile).Compare(currentQuality.Quality.Id, cutoff);
|
||||
|
||||
if (cutoffCompare < 0)
|
||||
{
|
||||
@@ -115,7 +116,11 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
|
||||
public bool LanguageCutoffNotMet(LanguageProfile languageProfile, Language currentLanguage)
|
||||
{
|
||||
var languageCompare = new LanguageComparer(languageProfile).Compare(currentLanguage, languageProfile.Cutoff);
|
||||
var cutoff = languageProfile.UpgradeAllowed
|
||||
? languageProfile.Cutoff
|
||||
: languageProfile.FirstAllowedLanguage();
|
||||
|
||||
var languageCompare = new LanguageComparer(languageProfile).Compare(currentLanguage, cutoff);
|
||||
|
||||
return languageCompare < 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user