fix(qobuz): cache bundle tokens and bound the fetch to stop startup hangs

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
This commit is contained in:
vicrodh committed 2026-06-05 01:09:54 -06:00
1 parent f3bba60dd0
commit 0cefe1ee80
7 files changed
+290 -21

No files matched your search

+3
View File
@@ -27,6 +27,9 @@ base64 = { workspace = true }
# Time
chrono = { workspace = true }
# Filesystem (bundle-token cache location)
dirs = "6"
# Regex
regex = { workspace = true }