Description
In v2.0.0, the detect_deletions job runs even when explicitly disabled in the config with detect_deletions: false.
Config
jobs:
remove_stalled:
remove_slow:
min_speed: 50
remove_failed_downloads:
# ... other jobs ...
detect_deletions: false # Explicitly disabled
Expected Behavior
Setting detect_deletions: false should prevent the job from running and skip the path validation.
Actual Behavior
The job still runs and produces warnings:
WARNING | Job 'detect_deletions' on Sonarr (http://localhost:8989) does not have access to this path and will not monitor it: '/data/media/library/shows'
Root Cause
In main.py, line 55:
if settings.jobs.detect_deletions:
await WatcherManager(settings).setup()
This checks if the JobParams object exists (always truthy), not whether it's enabled. It should be:
if settings.jobs.detect_deletions.enabled:
await WatcherManager(settings).setup()
This pattern is used correctly elsewhere, e.g., in job_manager.py:
if settings.jobs.search_missing.enabled:
Environment
- decluttarr version: v2.0.0
- Running in: Podman container with host networking
- Config method: config.yaml file mounted to container
Description
In v2.0.0, the
detect_deletionsjob runs even when explicitly disabled in the config withdetect_deletions: false.Config
Expected Behavior
Setting
detect_deletions: falseshould prevent the job from running and skip the path validation.Actual Behavior
The job still runs and produces warnings:
Root Cause
In
main.py, line 55:This checks if the
JobParamsobject exists (always truthy), not whether it's enabled. It should be:This pattern is used correctly elsewhere, e.g., in
job_manager.py:Environment