feat(slint): play-fetching spinner (now-playing bar + track row + album button)
A play can take seconds before audio starts (esp. Plex, whose resolve downloads the whole file) with no feedback today. Add a source-agnostic loading indicator: - A loading flag keyed to PENDING_PLAY_ID, raised at the top of play_audible (before the Plex/Qobuz/local resolve — single chokepoint, covers auto-advance) and cleared by the poll loop when the requested track's audio actually starts (position > 0). Cleared on every play-error early-return and force-cleared on queue-finished / peer-controller / ephemeral-stop so it never sticks. - Watchdog: force-clear after 45s if the engine accepted a play that silently never advances (undecodable-but-valid file) — otherwise the spinner is eternal. - Spinner on three surfaces driven by NowPlayingState.loading: now-playing bar (cover overlay + play/pause button), the active track row's play cell, and the album big play button (gated to the album actually being launched). Audio backend / playback routing untouched. The spinner only communicates the wait; the underlying Plex fetch latency is fixed separately (progressive streaming). cc
This commit is contained in:
9 files changed
+213
-13
No files matched your search
@@ -2106,6 +2106,12 @@ export global NowPlayingState {
|
||||
// it has no DB row, so favorite / add-to-playlist / track-info are gated off.
|
||||
in property <bool> is-ephemeral: false;
|
||||
in property <bool> playing: false;
|
||||
// Fetch/resolve in flight for the track being started — no audio yet.
|
||||
// Set the instant a play is requested (before the Plex/Qobuz/local
|
||||
// resolve) and cleared once the poll loop sees the audio advancing.
|
||||
// Drives the fetch spinner on the bar, the active track row, and the
|
||||
// album play button.
|
||||
in property <bool> loading: false;
|
||||
in property <int> position-secs: 0;
|
||||
in property <int> duration-secs: 0;
|
||||
in property <float> progress: 0.0; // 0..1
|
||||
|
||||
Reference in new issue
Block a user