Skip to content

v0.76.0-beta — Profiles & Overrides

Choose a tag to compare

@Abrechen2 Abrechen2 released this 26 Apr 11:38
· 1459 commits to master since this release

What's new since v0.71.0-beta

The 0.72-0.76 cycle delivers the Profiles & Overrides subsystem — a complete rework of how Sublarr lets you customize subtitle behaviour per series and per movie — plus the third Codex Settings template reference and several stability fixes.

Added

  • Profiles & Overrides Settings page (Codex Template C reference). A new top-level /settings/profiles page renders the inheritance chain Global → LanguageProfile → Series/Movie for twelve inheritable settings (cleanup_foreign_tracks, forced_preference, hi_preference, forced_scoring, target_languages, cutoff_language, must_contain, must_not_contain, audio_exclude_languages, preferred_audio_track_index, priority_override, min_attempts_per_day). Each row shows where the effective value comes from (a five-state pill: default / set / inherited / overridden / n/a) and lets you override it inline via type-aware widgets (TriStateToggle, enum selects, language pickers, tag inputs). Old standalone /language-profiles route 301-redirects here; the LanguageProfilesTab in Subtitles Settings is removed and profile CRUD lives in the new page's tree-header menu.
  • Per-series and per-movie override storage. series_settings gains eight new override columns; brand-new movie_settings table mirrors it. NULL means inherit; explicit values override. Single Alembic migration 506332eef4f7 (idempotent).
  • Per-series cleanup_foreign_tracks tri-state toggle in Series Settings Panel — Inherit / Always / Never. Inherit displays the resolved global default so you can see what currently wins.
  • /api/v1/profiles-overrides/ REST blueprint with eight endpoints: GET /scopes (filtered tree), GET /resolved/<type>/<id> (4 scope variants), PATCH /<type>/<id> (set/clear single override), POST /<type>/<id>/reset (clear all overrides), POST /<type>/<id>/create-override (idempotent — surfaces a series in the tree without setting values), DELETE /<type>/<id> (drops the row entirely). All Pydantic-validated against per-field whitelists.
  • PUT /api/v1/language-profiles/assign-bulk — multi-item profile assignment in one round-trip ({type, arr_ids, profile_id} → {assigned, failed[]}).
  • SeriesDetail / MovieDetail are the entry-point for per-item overrides. A Subtitle settings → button on every Series and Movie page idempotently creates the override row and navigates straight to the configured scope, with a ← Back to <name> round-trip link in the Settings detail pane.
  • Interactive LanguageProfile selector on every Series and Movie page. The previously read-only profile pill becomes a <select> listing every configured profile (default profile suffixed with ★). Backend now exposes profile_id alongside profile_name in the corresponding API responses.
  • Bulk profile assignment in the Library page. Multi-select via checkboxes in both the table and the grid view. A sticky toolbar appears when 1+ items are selected with a profile dropdown that bulk-assigns to every selection. Selection auto-resets on Series ↔ Movies tab switch.
  • Settings template trio complete. General is now the FormLayout reference (Template B), Providers the CollectionLayout reference (Template A), Profiles & Overrides the RulesLayout reference (Template C). Shared primitives (InheritanceRow, BudgetBar, ApiKeyField, ConnectionTest, HealthRail, TriStateToggle) are ready for every future Settings-page migration via the Hybrid-Ratchet rule.
  • Centralised navigation helpers in frontend/src/lib/routes.ts so future Settings-route restructuring touches one file.

Changed

  • Profiles & Overrides scope tree only shows explicit overrides. Series and movies appear only if they have a series_settings / movie_settings row OR a profile mapping — not just because they exist in the search cache. Default state on a fresh install is just [Global default, ▼ Profile A, ▼ Profile B]. Items are added explicitly from SeriesDetail / MovieDetail.
  • General Settings → FormLayout with section anchors and scroll-spy nav. No behaviour change.
  • Providers Settings → CollectionLayout. Master-list of providers on the left, inline detail editor on the right, optional health rail. Drag-drop reorder still works; selection is URL-addressable via ?id=. Replaces the legacy tile-grid + modal-on-click flow.
  • Dashboard StatusStripe is now a 3-state machine (active / idle / paused) backed by the real wanted_scanner + wanted_search scheduler state. idle is the new honest "armed, waiting for next run" state — replaces the misleading "Paused" badge that previously showed 99% of the time.
  • useAssignProfile invalidations widened so Series and Movie detail pages re-render their profile selector after a change.
  • Library batch-search error path now surfaces a toast instead of console.error-only.

Fixed

  • Subtitle Automation migration is now idempotent. The 0.71.0 schema migration used unguarded CREATE TABLE / ADD COLUMN statements that failed on re-runs against a partially-upgraded DB. Added IF NOT EXISTS guards and column-existence checks.
  • Wanted-scanner soft-timeout false alarms on large libraries. Full library scans on ~3000-item libraries routinely run 30+ min and tripped the 600 s monitoring timeout even though the scan completed successfully. Job timeout raised to 3600 s.
  • Latent crash on providers without config_fields — defensive null-fallback added to the inline provider editor.
  • Profiles & Overrides scope tree was empty on first deploy because GET /scopes queried a non-existent master series / movies table. Now aggregates IDs from search_series, wanted_items, series_settings / movie_settings, profile mappings and standalone library tables.
  • "overridden" pill was nonsense at Global scope. Five-state pill semantics introduced (default / set / inherited / overridden / n/a) — Global rows now correctly tagged default, profile-only fields show set here, and series-only fields viewed at Profile scope are n/a and greyed out.
  • Clicking a series in the Profiles & Overrides tree 404'd because /resolved/series/<id> required a settings row or mapping but /scopes listed broader sources. Both endpoints now consult the same source set.

Tests

  • ~70 new backend tests across resolver, schemas, routes, models, migration, and library bulk-assign.
  • ~85 new frontend tests across page assembly, primitives, widgets, hooks, and Library bulk-selection.

Deployed: ghcr.io/abrechen2/sublarr:0.76.0-beta
Docs: https://wiki.sublarr.de