feat(playback): source-aware artwork resolution (ArtworkRef + PlaybackSource)
Add the frontend-agnostic contract for the source-aware playback context: - qbz-models: new `source` module with `PlaybackSource` (Qobuz / OfflineCache / Local / Plex; parses the existing stringly-typed `source` field, defaults to Qobuz) and `ArtworkRef` (Remote / LocalFile / PlexThumb / Embedded / None). `QueueTrack::source_kind()` + `QueueTrack::artwork_ref()` derive both without changing the wire format. `PlaybackSource::is_qobuz_streamable()` seeds the Qobuz Connect queue gate (only Qobuz-sourced tracks are castable). - qbz-slint artwork pipeline: `fetch_and_decode_ref(&ArtworkRef, ...)` resolves cover bytes per origin — HTTP/Plex through the disk cache, local files read directly, embedded bytes in place. This fixes the root cause of local/Plex artwork never reaching the UI (the loader was HTTP-only). The URL-only `fetch_and_decode` becomes a thin wrapper, so all existing card/row jobs are unchanged. The now-playing loader now takes an `ArtworkRef` derived from the queue track, so local-library/Plex covers reach the now-playing bar. Groundwork for the Local Library Slint port (source-aware playback context designed in from the start). qbz-models tests pass; qbz-slint cargo check green. cc
This commit is contained in:
4 files changed
+270
-18
No files matched your search
@@ -33,6 +33,7 @@ pub mod error;
|
||||
pub mod events;
|
||||
pub mod mixtape;
|
||||
pub mod playback;
|
||||
pub mod source;
|
||||
pub mod traits;
|
||||
pub mod types;
|
||||
|
||||
@@ -40,6 +41,7 @@ pub mod types;
|
||||
pub use error::{QbzError, QbzResult};
|
||||
pub use events::CoreEvent;
|
||||
pub use playback::{PlaybackState, PlaybackStatus, QueueState, QueueTrack, RepeatMode};
|
||||
pub use source::{ArtworkRef, PlaybackSource};
|
||||
pub use traits::{FrontendAdapter, LoggingAdapter, NoOpAdapter};
|
||||
pub use types::{
|
||||
Album,
|
||||
|
||||
Reference in new issue
Block a user