Files
qbz/crates/qbz-core/Cargo.toml
T
vicrodh 9cc44f5d1d feat(reco): wire generate_playlist_suggestions into qbz-core (T6)
Add QbzCore::generate_playlist_suggestions + a per-user artist_vectors store
field (Arc<tokio::Mutex<Option<ArtistVectorStore>>>) with async
set_artist_vectors / clear_artist_vectors. It resolves each playlist artist NAME
to a confident MusicBrainz id (reusing musicbrainz_resolve_artist; the names come
from the playlist's own Qobuz tracks so they're already canonical, making the
Tauri command's extra Qobuz-name re-fetch unnecessary), then runs the
SuggestionsEngine over the core-owned clients + vector store.

Also aligns the qbz-reco builder/engine handle types to qbz-core's reality (the
plan's by-ref pattern doesn't fit): mb_client = Arc<MusicBrainzClient> (no lock,
Send+Sync); mb_cache = Arc<std::sync::Mutex<...>> (locked only in await-free
windows); Qobuz client = Arc<RwLock<Option<QobuzClient>>> (unwrapped per access).
The vector store stays tokio::Mutex (held across awaits by the engine). No
dependency cycle (qbz-reco does not depend on qbz-core). qbz-core checks clean;
23 qbz-reco tests green.

cc
2026-06-26 20:58:37 -06:00

42 lines
1.0 KiB
TOML

[package]
name = "qbz-core"
version.workspace = true
edition.workspace = true
license.workspace = true
description = "Core orchestrator for QBZ music player"
[dependencies]
qbz-models = { path = "../qbz-models" }
qbz-audio = { path = "../qbz-audio" }
qbz-player = { path = "../qbz-player" }
qbz-qobuz = { path = "../qbz-qobuz" }
qbz-radio = { path = "../qbz-radio" }
qbz-integrations = { path = "../qbz-integrations" }
qbz-offline-cache = { path = "../qbz-offline-cache" }
qbz-reco = { path = "../qbz-reco" }
# Async
tokio = { workspace = true }
async-trait = { workspace = true }
# Logging
log = { workspace = true }
# Error handling
thiserror = { workspace = true }
anyhow = { workspace = true }
# Serialization
serde = { workspace = true }
serde_json = { workspace = true }
[features]
default = []
# Tier 2 features (to be added later)
# offline = ["qbz-offlineplayback"]
# local-library = ["qbz-locallibrary"]
# cast = ["qbz-cast"]
# scrobbling = ["qbz-scrobbling"]
# plex = ["qbz-plex"]
# full = ["offline", "local-library", "cast", "scrobbling", "plex"]