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:
7 files changed
+290
-21
No files matched your search
@@ -360,6 +360,11 @@ impl Default for RuntimeManager {
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(tag = "event", content = "data")]
|
||||
pub enum RuntimeEvent {
|
||||
/// A live (cold) bundle-token extraction has started — no cache was
|
||||
/// available, so we must download Qobuz's ~7 MB bundle before the UI can
|
||||
/// proceed. The frontend shows a "connecting to Qobuz" state. Only emitted
|
||||
/// on a cold start (first run or after a cache wipe); warm starts skip it.
|
||||
BundleFetchStarted,
|
||||
/// Runtime initialized (client ready)
|
||||
RuntimeInitialized,
|
||||
/// Authentication state changed
|
||||
|
||||
Reference in new issue
Block a user