mpris album art: keep last good source, clear on track change

This commit is contained in:
Damocles 2026-04-12 18:33:04 +02:00
parent 2be333d3f0
commit 3ed00dd905

View file

@ -28,11 +28,17 @@ M.PopupPanel {
Image {
id: _artImg
anchors.fill: parent
source: menuWindow.player?.trackArtUrl ?? ""
fillMode: Image.PreserveAspectCrop
visible: status === Image.Ready
asynchronous: true
cache: false
property string _lastGoodSource: ""
property string _lastTrack: ""
readonly property string _artUrl: menuWindow.player?.trackArtUrl ?? ""
readonly property string _track: menuWindow.player?.trackTitle ?? ""
on_ArtUrlChanged: if (_artUrl) _lastGoodSource = _artUrl
on_TrackChanged: if (_track !== _lastTrack) { _lastTrack = _track; _lastGoodSource = _artUrl || "" }
source: _lastGoodSource
}
Rectangle {