mirror of
https://github.com/Radarr/Radarr
synced 2026-05-09 11:10:23 +02:00
Fixed: Allow saving profiles with large negative CF scores
This commit is contained in:
parent
e986869e96
commit
ea9494019e
1 changed files with 2 additions and 1 deletions
|
|
@ -32,7 +32,8 @@ public QualityProfileModule(IProfileService profileService, ICustomFormatService
|
||||||
}).WithMessage("All Custom Formats and no extra ones need to be present inside your Profile! Try refreshing your browser.");
|
}).WithMessage("All Custom Formats and no extra ones need to be present inside your Profile! Try refreshing your browser.");
|
||||||
SharedValidator.RuleFor(c => c).Custom((profile, context) =>
|
SharedValidator.RuleFor(c => c).Custom((profile, context) =>
|
||||||
{
|
{
|
||||||
if (profile.FormatItems.Sum(x => x.Score) < profile.MinFormatScore)
|
if (profile.FormatItems.Where(x => x.Score > 0).Sum(x => x.Score) < profile.MinFormatScore &&
|
||||||
|
profile.FormatItems.Max(x => x.Score) < profile.MinFormatScore)
|
||||||
{
|
{
|
||||||
context.AddFailure("Minimum Custom Format Score can never be satisfied");
|
context.AddFailure("Minimum Custom Format Score can never be satisfied");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue