[vlc-commits] [Git][videolan/vlc][master] qml: use fallback image if cover art fails to load in player page
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu Sep 18 11:16:35 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
c7200f46 by Fatih Uzunoglu at 2025-09-18T10:44:04+00:00
qml: use fallback image if cover art fails to load in player page
This is similar to how `PlaylistDelegate` behaves.
- - - - -
1 changed file:
- modules/gui/qt/player/qml/Player.qml
Changes:
=====================================
modules/gui/qt/player/qml/Player.qml
=====================================
@@ -374,10 +374,12 @@ FocusScope {
readonly property real eDPR: MainCtx.effectiveDevicePixelRatio(Window.window)
+ readonly property url targetSource: VLCAccessImage.uri(rootPlayer.coverSource)
+
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
- source: VLCAccessImage.uri(rootPlayer.coverSource)
+ source: targetSource
fillMode: Image.PreserveAspectFit
mipmap: true
cache: false
@@ -388,6 +390,15 @@ FocusScope {
Accessible.role: Accessible.Graphic
Accessible.name: qsTr("Cover")
+ onTargetSourceChanged: {
+ cover.source = targetSource
+ }
+
+ onStatusChanged: {
+ if (status === Image.Error)
+ cover.source = VLCStyle.noArtAlbumCover
+ }
+
Widgets.RoundedRectangleShadow {
color: Qt.rgba(0, 0, 0, .18)
yOffset: VLCStyle.dp(24)
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/c7200f46b42d187f8e4b2ae40fcdf700b3d4746f
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/c7200f46b42d187f8e4b2ae40fcdf700b3d4746f
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list