diff --git a/app/qml/mpris.qml b/app/qml/mpris.qml index 2447588ea..fb9e9e558 100644 --- a/app/qml/mpris.qml +++ b/app/qml/mpris.qml @@ -93,7 +93,7 @@ Kirigami.Page } Label { Layout.fillWidth: true - text: root.pluginInterface.artist + text: root.pluginInterface.artist.join(', ') visible: !nowPlaying.visible && !artistAlbum.visible && root.pluginInterface.artist.length > 0 wrapMode: Text.Wrap } @@ -106,7 +106,7 @@ Kirigami.Page Label { id: artistAlbum Layout.fillWidth: true - text: i18nd("kdeconnect-app", "%1 - %2", root.pluginInterface.artist, root.pluginInterface.album) + text: i18nd("kdeconnect-app", "%1 - %2", root.pluginInterface.artist.join(', '), root.pluginInterface.album) visible: !nowPlaying.visible && root.pluginInterface.album.length > 0 && root.pluginInterface.artist.length > 0 wrapMode: Text.Wrap } diff --git a/interfaces/dbusinterfaces.h b/interfaces/dbusinterfaces.h index ff23cb5a9..cefbcbefd 100644 --- a/interfaces/dbusinterfaces.h +++ b/interfaces/dbusinterfaces.h @@ -152,7 +152,7 @@ class KDECONNECTINTERFACES_EXPORT MprisDbusInterface : public OrgKdeKdeconnectDe Q_PROPERTY(int length READ length NOTIFY propertiesChangedProxy) Q_PROPERTY(QString nowPlaying READ nowPlaying NOTIFY propertiesChangedProxy) Q_PROPERTY(QString title READ title NOTIFY propertiesChangedProxy) - Q_PROPERTY(QString artist READ artist NOTIFY propertiesChangedProxy) + Q_PROPERTY(QStringList artist READ artist NOTIFY propertiesChangedProxy) Q_PROPERTY(QString album READ album NOTIFY propertiesChangedProxy) Q_PROPERTY(QStringList playerList READ playerList NOTIFY propertiesChangedProxy) diff --git a/plugins/mpriscontrol/mpriscontrolplugin-win.cpp b/plugins/mpriscontrol/mpriscontrolplugin-win.cpp index c47fcd379..e85cb858b 100644 --- a/plugins/mpriscontrol/mpriscontrolplugin-win.cpp +++ b/plugins/mpriscontrol/mpriscontrolplugin-win.cpp @@ -68,7 +68,7 @@ void MprisControlPlugin::sendMediaProperties(std::variant(QStringLiteral("nowPlaying"), m_nowPlaying); QString newTitle = np.get(QStringLiteral("title"), m_title); - QString newArtist = np.get(QStringLiteral("artist"), m_artist); + const QStringList newArtist = np.get(QStringLiteral("artist"), m_artist); QString newAlbum = np.get(QStringLiteral("album"), m_album); int newLength = np.get(QStringLiteral("length"), m_length); @@ -158,7 +157,7 @@ QString MprisRemotePlayer::title() const return m_title; } -QString MprisRemotePlayer::artist() const +QStringList MprisRemotePlayer::artist() const { return m_artist; } diff --git a/plugins/mprisremote/mprisremoteplayer.h b/plugins/mprisremote/mprisremoteplayer.h index ae506a19e..1e34afe23 100644 --- a/plugins/mprisremote/mprisremoteplayer.h +++ b/plugins/mprisremote/mprisremoteplayer.h @@ -27,7 +27,7 @@ public: bool playing() const; QString nowPlaying() const; QString title() const; - QString artist() const; + QStringList artist() const; QString album() const; QString identity() const; @@ -59,7 +59,7 @@ private: long m_lastPosition; qint64 m_lastPositionTime; QString m_title; - QString m_artist; + QStringList m_artist; QString m_album; bool m_canSeek; diff --git a/plugins/mprisremote/mprisremoteplugin.cpp b/plugins/mprisremote/mprisremoteplugin.cpp index d0d0be8b2..8a88dfed3 100644 --- a/plugins/mprisremote/mprisremoteplugin.cpp +++ b/plugins/mprisremote/mprisremoteplugin.cpp @@ -179,10 +179,10 @@ QString MprisRemotePlugin::album() const return player ? player->album() : QString(); } -QString MprisRemotePlugin::artist() const +QStringList MprisRemotePlugin::artist() const { auto player = m_players.value(m_currentPlayer); - return player ? player->artist() : QString(); + return player ? player->artist() : QStringList(); } bool MprisRemotePlugin::canSeek() const diff --git a/plugins/mprisremote/mprisremoteplugin.h b/plugins/mprisremote/mprisremoteplugin.h index acd8cb961..71b2a5e6c 100644 --- a/plugins/mprisremote/mprisremoteplugin.h +++ b/plugins/mprisremote/mprisremoteplugin.h @@ -28,7 +28,7 @@ class Q_DECL_EXPORT MprisRemotePlugin : public KdeConnectPlugin Q_PROPERTY(QString player READ player WRITE setPlayer) Q_PROPERTY(QString nowPlaying READ nowPlaying NOTIFY propertiesChanged) Q_PROPERTY(QString title READ title NOTIFY propertiesChanged) - Q_PROPERTY(QString artist READ artist NOTIFY propertiesChanged) + Q_PROPERTY(QStringList artist READ artist NOTIFY propertiesChanged) Q_PROPERTY(QString album READ album NOTIFY propertiesChanged) Q_PROPERTY(bool canSeek READ canSeek NOTIFY propertiesChanged) @@ -44,7 +44,7 @@ public: QString player() const; QString nowPlaying() const; QString title() const; - QString artist() const; + QStringList artist() const; QString album() const; bool canSeek() const;