S2 of the Lyrics epic: new shared crate crates/qbz-lyrics (headless, frontend-agnostic per ADR-006), the whole fetch/parse/cache engine in one testable home for Slint, Tauri and the TUI. - Domain model: LyricsDoc/LyricsLine/Word (native Qobuz wsync word stamps preserved) + the Tauri-wire-compatible LyricsPayload (camelCase serde); LyricsProvider gains the qobuz variant and round-trips it. - LRC parser ported from the Tauri TS semantics (gap markers as end-of-vocal, 8s MAX_SUNG cap, median last-line end) with the F5 defects fixed forward: multi-stamp lines split per stamp, [offset:] honored. Emitter renders wsync line bounds as LRC-with-gap-markers (Q5 persistence form, lossy at word level only). - Providers ported verbatim from src-tauri/src/lyrics/providers.rs: LRCLIB search-first + scorer and lyrics.ovh, request shapes byte-identical. - Cache: same per-user SQLite schema/path Tauri uses (WAL per ADR-002, no TTL) plus the additive qobuz_wsync_json column (amended Q5) with an idempotent in-place migration for Tauri-era DBs; readers prefer wsync. Stats read entries AND size from the per-user path (F1 fix). - Orchestrator LyricsService: cache probe with uniform plain-only soft miss (Q4) -> Qobuz primary (wsync authoritative; plain held while LRCLIB is probed for synced, the no-sync-regression rule) -> LRCLIB with one retry on transport error -> lyrics.ovh; offline = cache-only with typed NotAvailableOffline (F3); in-flight dedupe via shared futures (F6); request-key echo on every response for the caller stale guard (F2). - 55 unit tests: parser/emitter round-trips, scorer matrix, cache lifecycle + schema migration, chain priority/offline/dedupe with mocked providers. cc
80 lines
1.5 KiB
TOML
80 lines
1.5 KiB
TOML
[workspace]
|
|
resolver = "2"
|
|
|
|
members = [
|
|
"qbz-app",
|
|
"qbz-models",
|
|
"qbz-audio",
|
|
"qbz-player",
|
|
"qbz-qobuz",
|
|
"qbz-radio",
|
|
"qbz-core",
|
|
"qbz-integrations",
|
|
"qbz-cache",
|
|
"qbz-library",
|
|
"qbz-cast",
|
|
"qbz-cmaf",
|
|
"qbz-secrets",
|
|
"qbz-offline-cache",
|
|
"qbz-plex",
|
|
"qconnect-core",
|
|
"qconnect-protocol",
|
|
"qconnect-transport-ws",
|
|
"qconnect-app",
|
|
"qbz-slint",
|
|
"qbz-credentials",
|
|
"qbz-media-controls",
|
|
"qbz-mixtape",
|
|
"qbz-lyrics",
|
|
]
|
|
|
|
[workspace.package]
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
license = "MIT"
|
|
repository = "https://github.com/vicrodh/qbz"
|
|
|
|
[workspace.dependencies]
|
|
# Async runtime
|
|
tokio = { version = "1", features = ["full"] }
|
|
async-trait = "0.1"
|
|
futures-util = "0.3"
|
|
tokio-stream = { version = "0.1", features = ["sync"] }
|
|
|
|
# Serialization
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
|
|
# HTTP
|
|
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls", "cookies", "stream"] }
|
|
|
|
# Logging
|
|
log = "0.4"
|
|
tracing = "0.1"
|
|
|
|
# Error handling
|
|
thiserror = "2"
|
|
anyhow = "1"
|
|
|
|
# Crypto (Qobuz auth)
|
|
md-5 = "0.10"
|
|
base64 = "0.22"
|
|
|
|
# Time
|
|
chrono = "0.4"
|
|
|
|
# Regex
|
|
regex = "1"
|
|
|
|
# Audio
|
|
symphonia = { version = "0.5", features = ["all"] }
|
|
|
|
# Random number generation (shuffle / DJ-mix) — mirrors src-tauri pin
|
|
rand = "0.10"
|
|
|
|
# Fuzzy string similarity (track-mix dedup) — mirrors src-tauri pin
|
|
strsim = "0.11"
|
|
|
|
# Note: Linux-specific dependencies (alsa) go in individual crate Cargo.toml files
|
|
# because workspace manifests cannot have [target] sections
|