[vlc-commits] qml: display the associated artwork when available in network views
Pierre Lamot
git at videolan.org
Thu Feb 13 11:06:36 CET 2020
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Mon Feb 3 14:57:05 2020 +0100| [0307f27a97ba053812110756ffeaca89db073019] | committer: Jean-Baptiste Kempf
qml: display the associated artwork when available in network views
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0307f27a97ba053812110756ffeaca89db073019
---
modules/gui/qt/network/qml/NetworkGridItem.qml | 4 ++++
modules/gui/qt/network/qml/NetworkListItem.qml | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/modules/gui/qt/network/qml/NetworkGridItem.qml b/modules/gui/qt/network/qml/NetworkGridItem.qml
index 83c7004469..2676eb075d 100644
--- a/modules/gui/qt/network/qml/NetworkGridItem.qml
+++ b/modules/gui/qt/network/qml/NetworkGridItem.qml
@@ -35,6 +35,10 @@ Widgets.GridItem {
pictureHeight: VLCStyle.network_normal
image: {
+ if (model.artwork && model.artwork.toString() !== "") {
+ return model.artwork
+ }
+
switch (model.type){
case NetworkMediaModel.TYPE_DISC:
return "qrc:///type/disc.svg"
diff --git a/modules/gui/qt/network/qml/NetworkListItem.qml b/modules/gui/qt/network/qml/NetworkListItem.qml
index 75a0af7950..d64b5fe369 100644
--- a/modules/gui/qt/network/qml/NetworkListItem.qml
+++ b/modules/gui/qt/network/qml/NetworkListItem.qml
@@ -39,6 +39,10 @@ Widgets.ListItem {
id: cover_obj
fillMode: Image.PreserveAspectFit
source: {
+ if (model.artwork && model.artwork.toString() !== "") {
+ return model.artwork
+ }
+
switch (model.type) {
case NetworkMediaModel.TYPE_DISC:
return "qrc:///type/disc.svg"
More information about the vlc-commits
mailing list