feat(qbzd): scrobbling auth foundation — Last.fm / ListenBrainz (CONSOLE)

The connect flows, same methodology as `qbzd login`:
- `scrobble login lastfm`: LastFmClient::get_token prints an authorize URL, the
  user approves on last.fm, get_session exchanges it for a session key.
- `scrobble login listenbrainz --token <T>`: ListenBrainzClient::set_token
  validates a pasted user token (like `login --token`).
- `scrobble status` · `scrobble enable|disable <provider>`.

Credentials land in the CANONICAL scrobbler store
(qbz_app::settings::scrobblers::ScrobblerSettingsStore — SQLite at the daemon
data root), the SAME store the desktop uses and the one the settings bundle
export/import already carries, so scrobbler creds travel with `settings export`.
Secrets registered with qbz_log; a running daemon is nudged to reload.

- Cargo.toml: qbz-integrations path dep (already in-tree via qbz-core).
- cli/scrobble.rs: the verbs. main.rs: Scrobble subcommand group.

Verified: cargo test -p qbzd --bin qbzd -> 276 passed, 0 failed.

NOTE: lands CREDENTIALS + auth only. Scrobble-on-play (a daemon task on the
CoreEvent bus: update_now_playing on TrackStarted, scrobble past
scrobble_delay_secs, ListenBrainz submit + offline queue) is the next slice —
it wires the playback driver. The setup-TUI Scrobbler screen is also pending.

cc
This commit is contained in:
vicrodh committed 2026-07-19 19:11:43 -06:00
1 parent 620af9d75d
commit 17de908225
4 files changed
+171

No files matched your search

+1
View File
@@ -18,6 +18,7 @@ qbz-player = { path = "../qbz-player" }
qbz-audio = { path = "../qbz-audio" } # PROTECTED — read-only consumer
qbz-qobuz = { path = "../qbz-qobuz" }
qbz-reco = { path = "../qbz-reco" } # playlist recommendations (ArtistVectorStore); already in-tree via qbz-core
qbz-integrations = { path = "../qbz-integrations" } # Last.fm / ListenBrainz scrobbling; already in-tree via qbz-core
qbz-credentials = { path = "../qbz-credentials" }
qbz-log = { path = "../qbz-log" }
qconnect-core = { path = "../qconnect-core" }