Skip to content

detect_deletions runs even when explicitly disabled (v2.0.0) #329

@ghostwriternr

Description

@ghostwriternr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions