fix(qbz-qt): playlist artwork — own graphic for Qobuz, collage for the rest
Two bugs with one root: the card bound the playlist's `images*` lists, which are MEMBER-ALBUM covers, not the playlist's own artwork. So a Qobuz editorial playlist showed one of its albums' sleeves, and a user playlist — which has no `images*` at all — showed nothing. Qobuz playlists carry their graphic in `image_rectangle`, which the model did not deserialize; the field is added (additive, `serde(default)`, and Playlist is only ever built through serde) and the card prefers it, contain-fitted so the artwork is not cropped. Playlists without one fall back to the member-cover mosaic, reusing the collage the sidebar already draws rather than a second implementation. Both the All-tab grid and its list mode are covered — the 44px list thumb binds the same map and would otherwise have gone blank. cc
This commit is contained in:
6 files changed
+405
-8
No files matched your search
@@ -356,9 +356,24 @@ Rectangle {
|
||||
clip: true
|
||||
RoundedImage {
|
||||
anchors.fill: parent
|
||||
visible: !lrCollage.visible
|
||||
source: root.artMap[item.artKey] || ""
|
||||
radius: item.kind === "artist" ? 22 : 6
|
||||
fit: item.kind === "label" ? "contain" : "crop"
|
||||
// A Qobuz playlist's own graphic is contain-fitted like a
|
||||
// label logo — cropping it cuts the wordmark.
|
||||
fit: (item.kind === "label" || item.playlistOwnImage === true)
|
||||
? "contain" : "crop"
|
||||
}
|
||||
// User playlists have no graphic of their own, so they show the
|
||||
// member-cover mosaic instead of a blank tile.
|
||||
PlaylistCollage {
|
||||
id: lrCollage
|
||||
anchors.fill: parent
|
||||
visible: item.kind === "playlist"
|
||||
&& item.playlistOwnImage !== true
|
||||
&& (root.artMap[item.artKey] || "") === ""
|
||||
urls: item.covers || []
|
||||
radius: 6
|
||||
}
|
||||
Rectangle {
|
||||
visible: item.kind === "track" || item.kind === "album" || item.kind === "playlist"
|
||||
|
||||
Reference in new issue
Block a user