feat(slint): Last.fm and ListenBrainz scrobblers wired to player and settings
Re-implements the parked scrobblers-wip stash intent on the current tree (the stash no longer applied; it remains untouched in the stash list) with three corrections: the Last.fm offline queue uses the SHARED per-user offline_settings.db scrobble_queue (byte-identical SQL to Tauri - queues flush from either frontend) instead of a private table; the ListenBrainz cache opens Tauri's per-user path so LB creds and listen_queue are truly shared (a Tauri LB sign-in pre-seeds Slint); and the queue flush is driven by the offline engine's online edge (plus initial flush), not login-only. New frontend-agnostic qbz_app::settings::scrobblers store (master enable, Last.fm session/username, LB token/username; tests) and the shared scrobble-queue API on OfflineModeStore. Player wiring hooks the de-duped track-change edge inside the QConnect remote gate: now-playing fires on change (skipped offline), the scrobble arms at min(50%, 240s) with a generation counter cancelling stale timers, all sources scrobble (Tauri parity incl. the #360 version-enriched title). Offline or call failure queues; Last.fm flush honors the 50-batch and 14-day cutoff. Settings gains an Integrations section (Plex-section idiom): Last.fm browser-auth connect/finish/disconnect, ListenBrainz token field + validate, per-service enable toggles. Known gap documented: Last.fm creds cannot be shared with Tauri (webview localStorage); LB creds and both queues are shared. cc
This commit is contained in:
12 files changed
+1945
-2
No files matched your search
@@ -16,6 +16,7 @@ import { PlaybackSettings } from "PlaybackSettings.slint";
|
||||
import { AppearanceSettings } from "AppearanceSettings.slint";
|
||||
import { OfflineSettings } from "OfflineSettings.slint";
|
||||
import { LocalLibrarySettings } from "LocalLibrarySettings.slint";
|
||||
import { IntegrationsSettings } from "IntegrationsSettings.slint";
|
||||
import { DeveloperSettings } from "DeveloperSettings.slint";
|
||||
import { ScrollView } from "std-widgets.slint";
|
||||
|
||||
@@ -150,6 +151,14 @@ export component SettingsView inherits Rectangle {
|
||||
SettingsState.section = 4;
|
||||
}
|
||||
}
|
||||
SubNavItem {
|
||||
icon: @image-url("../assets/icons/refresh-cw.svg");
|
||||
label: @tr("Integrations");
|
||||
active: SettingsState.section == 6;
|
||||
clicked => {
|
||||
SettingsState.section = 6;
|
||||
}
|
||||
}
|
||||
SubNavItem {
|
||||
icon: @image-url("../assets/icons/bug.svg");
|
||||
label: @tr("Developer");
|
||||
@@ -225,6 +234,7 @@ export component SettingsView inherits Rectangle {
|
||||
}
|
||||
}
|
||||
if !SettingsState.loading && SettingsState.section == 4: LocalLibrarySettings { }
|
||||
if !SettingsState.loading && SettingsState.section == 6: IntegrationsSettings { }
|
||||
if !SettingsState.loading && SettingsState.section == 5: DeveloperSettings { }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user