diff --git a/app/qml/mpris.qml b/app/qml/mpris.qml --- a/app/qml/mpris.qml +++ b/app/qml/mpris.qml @@ -44,8 +44,31 @@ onCurrentTextChanged: root.pluginInterface.player = currentText } Label { + id: nowPlaying Layout.fillWidth: true text: root.pluginInterface.nowPlaying + visible: root.pluginInterface.title == "" + } + Label { + Layout.fillWidth: true + text: root.pluginInterface.title + visible: !nowPlaying.visible + } + Label { + Layout.fillWidth: true + text: root.pluginInterface.artist + visible: !nowPlaying.visible && !artistAlbum.visible && root.pluginInterface.artist != "" + } + Label { + Layout.fillWidth: true + text: root.pluginInterface.album + visible: !nowPlaying.visible && !artistAlbum.visible && root.pluginInterface.album != "" + } + Label { + id: artistAlbum + Layout.fillWidth: true + text: i18n("%1 - %2", root.pluginInterface.artist, root.pluginInterface.album) + visible: nowPlaying.visible && root.pluginInterface.album != "" && root.pluginInterface.artist != "" } RowLayout { Layout.fillWidth: true diff --git a/plugins/mprisremote/mprisremoteplugin.h b/plugins/mprisremote/mprisremoteplugin.h --- a/plugins/mprisremote/mprisremoteplugin.h +++ b/plugins/mprisremote/mprisremoteplugin.h @@ -74,7 +74,7 @@ Q_SCRIPTABLE void sendAction(const QString& action); Q_SIGNALS: - void propertiesChanged(); + Q_SCRIPTABLE void propertiesChanged(); private: void requestPlayerStatus(const QString& player);