feat(scheduler): add folder_scan_enabled toggle to SchedulerConfig

- Add folder_scan_enabled boolean field (default false) to SchedulerConfig
- Update data/config.json example with new field
- Add checkbox to setup.html and include in JS payload
- Handle field in auth.py setup endpoint
- Expose field in scheduler API response
- Log and return field in scheduler_service.py
- Update docs/CONFIGURATION.md and docs/ARCHITECTURE.md
- Update index.html UI, app.js and scheduler-config.js handlers
- Verified backward compatibility: old configs load with default False
This commit is contained in:
2026-05-11 21:02:05 +02:00
parent 079f1f99e3
commit c39ae9d0fc
12 changed files with 197 additions and 140 deletions

View File

@@ -309,6 +309,17 @@
</label>
</div>
<div class="config-item">
<label class="checkbox-label">
<input type="checkbox" id="folder-scan-enabled">
<span class="checkbox-custom"></span>
<span data-text="folder-scan-enabled">Run folder maintenance (NFO repair, renaming, poster checks)</span>
</label>
<small class="config-hint" data-text="folder-scan-hint">
Automatically repair NFOs, rename folders, and check posters during scheduled runs.
</small>
</div>
<div class="config-item scheduler-status" id="scheduler-status">
<div class="scheduler-info">

View File

@@ -479,6 +479,13 @@
<span>Auto-download missing episodes after rescan</span>
</label>
</div>
<div class="form-group">
<label class="form-checkbox">
<input type="checkbox" id="scheduler_folder_scan" name="scheduler_folder_scan">
<span>Run folder maintenance (NFO repair, renaming, poster checks)</span>
</label>
<div class="form-help">Automatically repair NFOs, rename folders, and check posters during scheduled runs</div>
</div>
</div>
</div>
@@ -761,6 +768,7 @@
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_folder_scan_enabled: document.getElementById('scheduler_folder_scan').checked,
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 ?