feat(local-library): add a Plex sync button to refresh media without restarting

Fetching new Plex music required restarting QBZ. Add a sync button in the Local Library header (gated on plex-available, with a busy spinner) that triggers the existing Plex re-sync (new plex_auth::sync_now over the persisted selected libraries) and refreshes the view. Strings in all 8 locales. Resolves #573.

cc
This commit is contained in:
vicrodh committed 2026-07-13 04:44:08 -06:00
1 parent 99cf738a4c
commit c3523722f4
12 files changed
+160 -3

No files matched your search

+9
View File
@@ -1056,6 +1056,11 @@ export global LocalLibraryState {
in-out property <string> active-tab: "albums";
in property <bool> loading: false;
in property <string> load-error: "";
// Plex manual sync (#573): `plex-available` gates the header Sync button
// (Plex enabled + authenticated — seeded at startup from the store, kept
// fresh by plex_auth's gate refresh); `plex-syncing` drives its spinner.
in property <bool> plex-available: false;
in property <bool> plex-syncing: false;
// Header stats / per-tab badge counts.
in property <int> album-count: 0;
in property <int> artist-count: 0;
@@ -1197,6 +1202,10 @@ export global LocalLibraryActions {
callback select-tab(string /* "albums"|"artists"|"folders"|"tracks" */);
// Open Settings > Local Library (the gear button — management lives there).
callback open-settings();
// Manual Plex re-sync (#573) — the header Sync button, visible only when
// Plex is configured. Re-fetches sections + tracks, then the Rust side
// reloads the browse models in place.
callback sync-plex();
// --- Albums tab ---
// Re-query page 1 with the current search text (server-side LIKE).