Skip to content

settings cleanup; un-ship Lidarr + Navidrome-DB cleanup; fix false 'installed' state; scale caps - #41

Merged
tajanthind merged 1 commit into
mainfrom
fix/settings-cleanup-and-un-ship-plugins
Sep 4, 2026
Merged

tajanthind merged 1 commit into
mainfrom
fix/settings-cleanup-and-un-ship-plugins

Conversation

@tajanthind

@tajanthind tajanthind commented Sep 3, 2026 •

Copy link
Copy Markdown
Owner

One PR answering all four asks. Yes — removing the built-in Lidarr API thing is possible (and the Navidrome-DB cleanup too): both are un-shipped per your choice (kept installable from the fnack-plugins catalog, free to rebuild later as your own plugins — no core change needed).

Settings cleanup

  • Removed the Lidarr Integration card + API-key copy/rotate UI + /api/settings/rotate-key route.
  • Removed dead legacy JS (navidrome test/scan/fix-splits handlers, key handlers).
  • Library-Maintenance copy no longer claims "Navidrome split repair".
  • The "Plugins & Extensibility" hub no longer hardcodes a plugin-name inventory (it was stale by design); it now describes essential vs Marketplace generically.

Un-ship (catalog-only, still installable)

  • fnack.lidarr, fnack.clean-navidrome-artists, fnack.fix-navidrome-splits removed from bundled_plugins/ (15 vendored remain). Still fully listed in the fnack-plugins Marketplace — verified install/load/uninstall live.
  • Removed the shipped Navidrome DB-direct split repair: navidrome plugin's run_split_repair/consolidate_split_albums deleted, /api/navidrome/fix-splits route removed, maintenance no longer invokes it. Navidrome plugin keeps media.scan/health/connection_test. fnack-plugins synced + repackaged (release asset clobbered, sha verified).
  • Context helpers the catalog plugins use (queue_lidarr_grab, search_albums, …) stay.

"Installed from official repo even when not" — fixed

  • Marketplace "installed" is now derived from physically present plugin dirs, not orphaned InstalledPlugin rows — plugins an older image auto-installed but which no longer ship no longer show as installed.
  • Startup removes orphan rows (present-only reconciliation). Live: InstalledPlugin dropped to the 5 actually present (4 essential + marketplace-installed musicbrainz).

Scale (targeted pass)

  • /api/artists always returns {total, artists, truncated} with a default 1000-artist page — no unbounded payloads; q= filters server-side.
  • Dashboard loads page 1; the grid filter now searches the whole library server-side (debounced) instead of shipping every artist; count label + no-match vs empty states.
  • download_jobs gains (status, created_at) + (status, updated_at) composite indexes (model + migration) so the queue page stays indexed at millions of rows.
  • Larger items (dashboard infinite pagination UI, chunking the background maintenance loops) are documented follow-ups.

Verification

Architecture 23/23 (navidrome/media-server/phase3 tests updated to assert the un-shipped invariant — not weakened), smoke PASSED, schema-migration PASSED. Live: reconciled rows, correct Marketplace badges, un-shipped plugins installable, paginated artists API, cleaned Settings page.


Follow-up commit 6fcf911: removed the core Library Maintenance schedule / "Run Maintenance Now" from Performance & Automation (settings UI + key + auto-spawn at boot/periodic + /api/maintenance/run). Library cleanup is now plugin-maintained (library.task plugins / future plugins); core scripts + tag_normalization_service stay so plugins can call them. No fnack-plugins changes. Failed-song auto-retry settings retained. Verified live: no maintenance controls, route 404, no boot spawn.

…eanup, installed-state fix, scale caps

One PR. Answers: yes, removing the built-in Lidarr/Navidrome-DB-cleanup is
possible — they're un-shipped (catalog-only) per choice, rebuildable later as
plugins without core changes.

Settings cleanup (templates/settings.html, app.py, static/app.js):
- Removed the Lidarr Integration card + its API-key copy/rotate UI and the
  /api/settings/rotate-key route.
- Removed dead legacy JS (navidrome test/scan/fix-splits handlers, copy/
  rotate key) and the stale "queries Deezer" copy.
- Library Maintenance copy no longer claims Navidrome split repair.
- "Plugins & Extensibility" hub no longer hardcodes a plugin inventory
  (stale by design); it describes essential vs Marketplace generically.

Un-ship (stop bundling; keep installable from the fnack-plugins catalog):
- Removed fnack.lidarr, fnack.clean-navidrome-artists and
  fnack.fix-navidrome-splits from bundled_plugins/ (15 vendored remain).
- Removed the shipped Navidrome DB-direct split repair: navidrome plugin's
  run_split_repair + consolidate_split_albums/run_auto_split_repair deleted,
  /api/navidrome/fix-splits route removed, maintenance no longer invokes it.
  DB cleanup stays possible via the catalog plugins / a future plugin.
  fnack-plugins navidrome plugin synced + repackaged; v1.0.0 release asset
  clobbered (sha verified).
- Context helpers (queue_lidarr_grab, search_albums, ...) stay — the catalog
  plugins still use them.

Installed-state fix (plugins/registry.py + startup reconciliation):
- Marketplace "installed" is now derived from PHYSICALLY present plugin dirs
  (bundled or /config/plugins), not orphaned InstalledPlugin rows — plugins
  from older images that no longer ship no longer appear "installed from the
  official repo" when their code is absent.
- Startup removes orphan InstalledPlugin rows (present-only reconciliation).

Scale (targeted; full dashboard pagination is a follow-up):
- /api/artists always returns {total, artists, truncated} with a default
  page of 1000 — an unbounded bare array can never be produced; `q=` does
  server-side name filtering.
- Dashboard fetches page 1 and the grid filter now searches server-side
  across the whole library (debounced) instead of shipping every artist;
  count label + no-match vs empty states.
- download_jobs gains (status, created_at) and (status, updated_at)
  composite indexes (model + migration) so the queue page stays indexed.

Tests: architecture 23/23 (navidrome/media-server/phase3 tests updated to
assert the un-shipped invariant), smoke PASSED, schema-migration PASSED.
Live: stale rows reconciled (InstalledPlugin 5 = the 4 essential +
marketplace-installed musicbrainz), Marketplace marks only real installs as
installed, un-shipped catalog plugins install/load/uninstall cleanly, artists
API returns the paginated shape, Settings page loads without the removed
sections.
@tajanthind
tajanthind merged commit 624d116 into main Sep 4, 2026
2 checks passed
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.

1 participant