feat(slint): MPRIS album art (mpris:artUrl) — Qobuz pass-through + local file://
Port the Tauri normalizeCoverUrlForMetadata workaround as ArtworkRef::to_mpris_url (qbz-models): remote Qobuz covers pass through as-is, local-file covers become a percent-encoded file:// URI (MPRIS clients cannot read bare paths or asset://), Plex thumbs become a tokenized HTTP URL. Wired into the Slint now-playing push so the media widget shows album art. The app icon was already fixed via DesktopEntry. cc
This commit is contained in:
4 files changed
+39
-3
No files matched your search
@@ -562,15 +562,16 @@ pub(crate) async fn refresh_now_playing_meta(runtime: &Runtime, weak: &slint::We
|
||||
}
|
||||
|
||||
// Push to the OS media controls (MPRIS / SMTC / MediaRemote). The app icon
|
||||
// GNOME shows comes from the MPRIS DesktopEntry, not from album art; art_url
|
||||
// (album art) is a later refinement.
|
||||
// GNOME shows comes from the MPRIS DesktopEntry; `art_url` is the album art
|
||||
// (`mpris:artUrl`) — remote Qobuz covers pass through, local covers become a
|
||||
// file:// URI, matching the Tauri `normalizeCoverUrlForMetadata` workaround.
|
||||
if let Some(mc) = crate::media_controls::handle() {
|
||||
mc.set_metadata(&qbz_media_controls::TrackMeta {
|
||||
title: title.clone(),
|
||||
artist: artist.clone(),
|
||||
album: album.clone(),
|
||||
duration: (duration > 0).then(|| std::time::Duration::from_secs(duration as u64)),
|
||||
art_url: None,
|
||||
art_url: artwork.to_mpris_url(),
|
||||
});
|
||||
mc.set_playback(
|
||||
qbz_media_controls::PlaybackStatus::Playing,
|
||||
|
||||
Reference in new issue
Block a user