mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2025-12-30 17:39:03 -05:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e96be1fca2 |
@@ -495,7 +495,7 @@ public class ConfigurationController : ControllerBase
|
||||
// Validate cron expression if present
|
||||
if (!string.IsNullOrEmpty(newConfig.CronExpression))
|
||||
{
|
||||
CronValidationHelper.ValidateCronExpression(newConfig.CronExpression, JobType.ContentBlocker);
|
||||
CronValidationHelper.ValidateCronExpression(newConfig.CronExpression, JobType.MalwareBlocker);
|
||||
}
|
||||
|
||||
// Get existing config
|
||||
@@ -513,7 +513,7 @@ public class ConfigurationController : ControllerBase
|
||||
await _dataContext.SaveChangesAsync();
|
||||
|
||||
// Update the scheduler based on configuration changes
|
||||
await UpdateJobSchedule(oldConfig, JobType.ContentBlocker);
|
||||
await UpdateJobSchedule(oldConfig, JobType.MalwareBlocker);
|
||||
|
||||
return Ok(new { Message = "ContentBlocker configuration updated successfully" });
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public static class LoggingDI
|
||||
const string fileOutputTemplate = $"{{@t:yyyy-MM-dd HH:mm:ss.fff zzz}} [{{@l:u3}}]{jobNameTemplate}{categoryTemplate} {{@m:lj}}\n{{@x}}";
|
||||
|
||||
// Determine job name padding
|
||||
List<string> jobNames = [nameof(JobType.QueueCleaner), nameof(JobType.ContentBlocker), nameof(JobType.DownloadCleaner)];
|
||||
List<string> jobNames = [nameof(JobType.QueueCleaner), nameof(JobType.MalwareBlocker), nameof(JobType.DownloadCleaner)];
|
||||
int jobPadding = jobNames.Max(x => x.Length) + 2;
|
||||
|
||||
// Determine instance name padding
|
||||
|
||||
@@ -6,6 +6,6 @@ namespace Cleanuparr.Infrastructure.Models;
|
||||
public enum JobType
|
||||
{
|
||||
QueueCleaner,
|
||||
ContentBlocker,
|
||||
MalwareBlocker,
|
||||
DownloadCleaner
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public static class CronValidationHelper
|
||||
throw new ValidationException($"{cronExpression} should have a fire time of maximum {Constants.TriggerMaxLimit.TotalHours} hours");
|
||||
}
|
||||
|
||||
if (jobType is not JobType.ContentBlocker && triggerValue < Constants.TriggerMinLimit)
|
||||
if (jobType is not JobType.MalwareBlocker && triggerValue < Constants.TriggerMinLimit)
|
||||
{
|
||||
throw new ValidationException($"{cronExpression} should have a fire time of minimum {Constants.TriggerMinLimit.TotalSeconds} seconds");
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
</label>
|
||||
<div class="field-input">
|
||||
<p-checkbox formControlName="deletePrivate" [binary]="true"></p-checkbox>
|
||||
<small class="form-helper-text">Enable this if you want to keep private torrents in the download client even if they are removed from the arrs</small>
|
||||
<small class="form-helper-text">Disable this if you want to keep private torrents in the download client even if they are removed from the arrs</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
</label>
|
||||
<div class="field-input">
|
||||
<p-checkbox formControlName="deletePrivate" [binary]="true"></p-checkbox>
|
||||
<small class="form-helper-text">Enable this if you want to keep private torrents in the download client even if they are removed from the arrs</small>
|
||||
<small class="form-helper-text">Disable this if you want to keep private torrents in the download client even if they are removed from the arrs</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
</label>
|
||||
<div class="field-input">
|
||||
<p-checkbox formControlName="deletePrivate" [binary]="true"></p-checkbox>
|
||||
<small class="form-helper-text">Enable this if you want to keep private torrents in the download client even if they are removed from the arrs</small>
|
||||
<small class="form-helper-text">Disable this if you want to keep private torrents in the download client even if they are removed from the arrs</small>
|
||||
</div>
|
||||
</div>
|
||||
</p-accordion-content>
|
||||
@@ -399,7 +399,7 @@
|
||||
</label>
|
||||
<div class="field-input">
|
||||
<p-checkbox formControlName="deletePrivate" [binary]="true"></p-checkbox>
|
||||
<small class="form-helper-text">Enable this if you want to keep private torrents in the download client even if they are removed from the arrs</small>
|
||||
<small class="form-helper-text">Disable this if you want to keep private torrents in the download client even if they are removed from the arrs</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user