Skip to content

feat: default quality profile per Radarr / Sonarr instance (#5) - #105

Open
ndandan wants to merge 1 commit into
Shoshuo:mainfrom
ndandan:pr/default-quality-profile
Open

ndandan wants to merge 1 commit into
Shoshuo:mainfrom
ndandan:pr/default-quality-profile

Conversation

@ndandan

@ndandan ndandan commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Fixes #5.

Implements the plan you outlined on the issue — "a default quality profile picker per service in /admin/settings, applied to all quick-add and suggested-add flows. Falls back to the current behaviour when not set, so existing installs aren't affected."

What changes

  • Each Radarr / Sonarr instance's edit form in /admin/settings gains a "Default quality profile" picker. Its options are loaded live from that instance's own Radarr/Sonarr when the modal opens (with the stored value rendered as a fallback option so it round-trips even if the fetch fails).
  • When set, that profile is preselected in the quick-add / suggested-add modal and the films/series library add forms, instead of whichever profile the service happens to return first.
  • Leaving it on "None" keeps the current behaviour, so existing installs are unaffected until an admin opts in.
  • A server-side fallback applies the instance default to programmatic adds (/films/add, /series/add) that don't specify a profile.

Per-instance, not per-service-type

I stored the default per ServiceInstance rather than per service type: quality-profile ids aren't shared across instances (profile 3 on "Radarr 1080p" is a different profile from 3 on "Radarr 4K"), so a single per-type default would be meaningless with multiple instances. It's a new nullable default_quality_profile_id column with a migration (auto-applies on boot; null default = existing behaviour). The picker still lives in /admin/settings via the instance edit modal, matching your intent.

Includes provider round-trip tests and a candidate-exposure test; full suite green. EN + FR labels added. Shipped and verified live on my fork (admin picker loads real profiles, default persists, and both the global quick-add and library add modals preselect it).

Adds a default quality profile picker to each Radarr/Sonarr instance's
edit form in /admin/settings. When set, it is preselected in every
quick-add / suggested-add and library add flow instead of whichever
profile the service happens to return first; null keeps the previous
behaviour, so existing installs are unaffected.

Stored per ServiceInstance (profile ids aren't shared across instances)
via a new nullable default_quality_profile_id column + migration
(auto-applies on boot). Threaded through ServiceInstanceProvider
create/update. Consumed by: the global quick-add modal (via the resolve
candidates payload), the films library modal (via /films/config), the
series library modal (via the rendered instance), plus a server-side
fallback in filmAdd/seriesAdd so programmatic/degraded adds honor it too.

Full suite green (1117); provider round-trip + candidate-exposure covered.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

[Feature] Preselect quality profile for sonarr and radarr

1 participant