Startup blocked on Qobuz's ~7 MB web bundle download with no cache or timeout, so a slow CDN left the app on a blank screen for 25-30s before the login screen appeared. Cache the extracted tokens on disk (keyed by bundle version), apply them instantly on warm starts and refresh in the background, and bound the cold fetch with a per-request timeout + retry. The legacy api client shares the same cache. Emits BundleFetchStarted so the UI can show a connecting state on the first run. cc
42 lines
765 B
TOML
42 lines
765 B
TOML
[package]
|
|
name = "qbz-qobuz"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "Qobuz API client for QBZ"
|
|
|
|
[dependencies]
|
|
qbz-models = { path = "../qbz-models" }
|
|
qbz-cmaf = { path = "../qbz-cmaf" }
|
|
|
|
# Async
|
|
tokio = { workspace = true }
|
|
futures-util = { workspace = true }
|
|
|
|
# HTTP
|
|
reqwest = { workspace = true }
|
|
|
|
# Serialization
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
|
|
# Crypto (for Qobuz auth)
|
|
md-5 = { workspace = true }
|
|
base64 = { workspace = true }
|
|
|
|
# Time
|
|
chrono = { workspace = true }
|
|
|
|
# Filesystem (bundle-token cache location)
|
|
dirs = "6"
|
|
|
|
# Regex
|
|
regex = { workspace = true }
|
|
|
|
# Logging
|
|
log = { workspace = true }
|
|
|
|
# Error handling
|
|
thiserror = { workspace = true }
|
|
anyhow = { workspace = true }
|