Skip to content

feat: per-pass tag filters (missing / cutoff / upgrade) - #834

Open
eric-engberg wants to merge 1 commit into
av1155:mainfrom
eric-engberg:feat/per-pass-tag-filters
Open

eric-engberg wants to merge 1 commit into
av1155:mainfrom
eric-engberg:feat/per-pass-tag-filters

Conversation

@eric-engberg

Copy link
Copy Markdown

Summary

Adds optional per-pass tag filter overrides so an item can be kept out of the cutoff and upgrade passes while its missing items are still searched. Each pass section in the instance form gets its own Tag Include / Tag Exclude pair. A blank override falls back to the instance-wide Tag Filter · Include / Tag Filter · Exclude, one direction at a time, so existing instances filter exactly as before.

Closes #833

Changes

  • Instance form: Missing Tag Include / Exclude (Search Policy), Cutoff Tag Include / Exclude (Cutoff Upgrades) and Upgrade Tag Include / Exclude (Library Upgrades), with tooltips explaining the fallback.
  • Schema v22 adds tag_filter_{missing,cutoff,upgrade}_{include,exclude} TEXT columns with empty defaults on instances.
  • TagFilterPolicy carries the six overrides and a for_pass() lookup that applies the per-direction fallback.
  • The engine still makes one /tag GET per cycle and now resolves labels for each pass separately. The GET is skipped when no enabled pass has labels, and unknown labels are logged once per cycle across all passes.
  • Override fields go through the same validation as the instance-wide pair; errors name the field (Tag filter cutoff exclude: ...).
  • Docs: per-pass overrides in Instance Settings > Tag filter, and the Skip Reasons tag filter rows.

Testing

All checks pass. New tests cover the v22 migration and self-heal, the fallback rules, per-pass resolution sharing one /tag GET, the settings form round trip, and the issue's case end to end: a tagged Sonarr series is searched by the missing pass and skipped by the cutoff pass, and the same for a Radarr upgrade.

Type of Change

  • Bug fix (fix:)
  • New feature (feat:)
  • Refactoring (refactor:)
  • Documentation (docs:)
  • CI/CD (ci:)
  • Chore (chore:)

Checklist

  • Issue exists and is linked above with Closes #N
  • Linked issue has exactly one type:* and one priority:* label
  • Linked issue has at most one phase:* label (or none when not roadmap work)
  • Branch name matches issue scope (feat/<slug>, fix/<slug>, etc.)
  • Tests added/updated for all changes
  • Type check passes (mypy src/)
  • Lint passes (ruff check .)
  • Format passes (ruff format --check .)
  • Documentation updated (if applicable)
  • No secrets or sensitive data committed
  • Scope check: This change helps search for missing or cutoff-unmet media in a controlled way

🤖 Generated with Claude Code

The instance-wide tag filter applies to every pass, so a series that
must not be upgraded can only be excluded from missing searches too.
Each pass now has optional include / exclude overrides. A blank
override falls back to the instance-wide list of the same direction,
so existing instances filter exactly as before.

Schema v22 adds six tag_filter_{missing,cutoff,upgrade}_{include,
exclude} columns with empty defaults. The /tag lookup still runs once
per cycle and is skipped when no enabled pass carries labels.

Closes av1155#833

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: per-pass tag filters (missing / cutoff / upgrade)

1 participant