mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-05-09 07:13:59 -04:00
Fix queue rules upper bound to never allow 0 (#543)
This commit is contained in:
@@ -261,10 +261,10 @@
|
||||
helpKey="queue-cleaner:stallRule.privacyType" />
|
||||
<app-number-input label="Min Completion %" [(value)]="stallMinCompletion" [min]="0" [max]="100" suffix="%"
|
||||
hint="Apply the rule once completion percentage exceeds this value (0 includes items at 0% and above)"
|
||||
[error]="stallCompletionError()"
|
||||
helpKey="queue-cleaner:stallRule.completionRange" />
|
||||
<app-number-input label="Max Completion %" [(value)]="stallMaxCompletion" [min]="0" [max]="100" suffix="%"
|
||||
<app-number-input label="Max Completion %" [(value)]="stallMaxCompletion" [min]="1" [max]="100" suffix="%"
|
||||
hint="Apply the rule to items with a completion percentage less than or equal to this value"
|
||||
[error]="stallCompletionError()"
|
||||
helpKey="queue-cleaner:stallRule.completionRange" />
|
||||
<app-toggle label="Reset Strikes on Progress" [(checked)]="stallResetOnProgress"
|
||||
hint="Reset strike count when torrent shows progress"
|
||||
@@ -314,10 +314,10 @@
|
||||
helpKey="queue-cleaner:slowRule.privacyType" />
|
||||
<app-number-input label="Min Completion %" [(value)]="slowMinCompletion" [min]="0" [max]="100" suffix="%"
|
||||
hint="Apply the rule once completion percentage exceeds this value (0 still includes exactly 0%)"
|
||||
[error]="slowCompletionError()"
|
||||
helpKey="queue-cleaner:slowRule.completionRange" />
|
||||
<app-number-input label="Max Completion %" [(value)]="slowMaxCompletion" [min]="0" [max]="100" suffix="%"
|
||||
<app-number-input label="Max Completion %" [(value)]="slowMaxCompletion" [min]="1" [max]="100" suffix="%"
|
||||
hint="Apply the rule up to and including this completion percentage"
|
||||
[error]="slowCompletionError()"
|
||||
helpKey="queue-cleaner:slowRule.completionRange" />
|
||||
<app-size-input label="Ignore Above Size" [units]="sizeUnitsLarge" [(value)]="slowIgnoreAboveSize"
|
||||
placeholder="e.g. 25"
|
||||
|
||||
@@ -236,6 +236,7 @@ export class QueueCleanerComponent implements OnInit, HasPendingChanges {
|
||||
readonly stallCompletionError = computed(() => {
|
||||
const min = this.stallMinCompletion() ?? 0;
|
||||
const max = this.stallMaxCompletion() ?? 100;
|
||||
if (max <= 0) return 'Max percentage must be greater than 0';
|
||||
if (max < min) return 'Max percentage must be greater than or equal to Min percentage';
|
||||
return undefined;
|
||||
});
|
||||
@@ -256,6 +257,7 @@ export class QueueCleanerComponent implements OnInit, HasPendingChanges {
|
||||
readonly slowCompletionError = computed(() => {
|
||||
const min = this.slowMinCompletion() ?? 0;
|
||||
const max = this.slowMaxCompletion() ?? 100;
|
||||
if (max <= 0) return 'Max percentage must be greater than 0';
|
||||
if (max < min) return 'Max percentage must be greater than or equal to Min percentage';
|
||||
return undefined;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user