Remove deprecated legacy interval field from setup and settings UI
This commit is contained in:
@@ -144,7 +144,6 @@ AniWorld.MainConfig = (function() {
|
||||
|
||||
// Populate scheduler settings
|
||||
document.getElementById('scheduled-rescan-enabled').checked = config.scheduler?.enabled || false;
|
||||
document.getElementById('scheduled-rescan-interval').value = config.scheduler?.interval_minutes || 60;
|
||||
|
||||
// Populate logging settings
|
||||
document.getElementById('log-level').value = config.logging?.level || 'INFO';
|
||||
|
||||
@@ -82,16 +82,12 @@ AniWorld.SchedulerConfig = (function() {
|
||||
const autoDownloadEl = document.getElementById('auto-download-after-rescan');
|
||||
const autoDownload = autoDownloadEl ? autoDownloadEl.checked : false;
|
||||
|
||||
const intervalEl = document.getElementById('scheduled-rescan-interval');
|
||||
const interval = intervalEl ? (parseInt(intervalEl.value) || 60) : 60;
|
||||
|
||||
// POST directly to the scheduler config endpoint
|
||||
const payload = {
|
||||
enabled: enabled,
|
||||
schedule_time: scheduleTime,
|
||||
schedule_days: scheduleDays,
|
||||
auto_download_after_rescan: autoDownload,
|
||||
interval_minutes: interval
|
||||
auto_download_after_rescan: autoDownload
|
||||
};
|
||||
|
||||
const response = await AniWorld.ApiClient.post(API.SCHEDULER_CONFIG, payload);
|
||||
|
||||
@@ -305,17 +305,6 @@
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Advanced: legacy interval (hidden by default) -->
|
||||
<details class="config-advanced">
|
||||
<summary data-text="advanced-settings">Advanced</summary>
|
||||
<div class="config-item" id="rescan-interval-config">
|
||||
<label for="scheduled-rescan-interval" data-text="rescan-interval">Legacy Check Interval (minutes):</label>
|
||||
<input type="number" id="scheduled-rescan-interval" value="60" min="1" class="input-field">
|
||||
<small class="config-hint" data-text="rescan-interval-hint">
|
||||
Deprecated: only used if cron scheduling is not configured
|
||||
</small>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<div class="config-item scheduler-status" id="scheduler-status">
|
||||
<div class="scheduler-info">
|
||||
|
||||
@@ -480,17 +480,6 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<details class="form-advanced">
|
||||
<summary>Advanced</summary>
|
||||
<div class="form-row" style="margin-top:0.75rem">
|
||||
<div class="form-group">
|
||||
<label for="scheduler_interval_minutes" class="form-label">Legacy Interval (minutes)</label>
|
||||
<input type="number" id="scheduler_interval_minutes" name="scheduler_interval_minutes"
|
||||
class="form-input" value="60" min="1">
|
||||
<div class="form-help">Deprecated: only used if cron scheduling is not configured.</div>
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
|
||||
<!-- Logging Settings -->
|
||||
@@ -772,7 +761,6 @@
|
||||
scheduler_schedule_time: document.getElementById('scheduler_schedule_time').value || '03:00',
|
||||
scheduler_schedule_days: Array.from(document.querySelectorAll('.scheduler-day-setup-cb:checked')).map(cb => cb.value),
|
||||
scheduler_auto_download_after_rescan: document.getElementById('scheduler_auto_download').checked,
|
||||
scheduler_interval_minutes: parseInt(document.getElementById('scheduler_interval_minutes').value) || 60,
|
||||
logging_level: document.getElementById('logging_level').value,
|
||||
logging_file: document.getElementById('logging_file').value.trim() || null,
|
||||
logging_max_bytes: document.getElementById('logging_max_bytes').value ?
|
||||
|
||||
Reference in New Issue
Block a user