[vlc-devel] [PATCH 05/14] qml: display the associated artwork when available in network views
Pierre Lamot
pierre at videolabs.io
Thu Feb 6 13:56:42 CET 2020
---
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"
--
2.17.1
More information about the vlc-devel
mailing list