D8957: Add title, artist and album to MPRIS network packets

Aleix Pol Gonzalez noreply at phabricator.kde.org
Wed Nov 22 23:43:30 UTC 2017


apol requested changes to this revision.
apol added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> mpriscontrolplugin.cpp:149
> +        } else {
> +            np.set(QStringLiteral("album"), QStringLiteral(""));
> +        }

You can use `{}` instead of `QStringLiteral("")`.

> mpriscontrolplugin.cpp:260
>          QString nowPlaying = nowPlayingMap[QStringLiteral("xesam:title")].toString();
> -        if (nowPlayingMap.contains(QStringLiteral("xesam:artist"))) {
> +        if (!nowPlayingMap[QStringLiteral("xesam:artist")].toString().isEmpty()) {
> +            answer.set(QStringLiteral("artist"), nowPlayingMap[QStringLiteral("xesam:artist")].toString());

Can you put the string in a separate variable? it will be easier to read.

> mpriscontrolplugin.cpp:282
>          answer.set(QStringLiteral("isPlaying"), playing);
> +        answer.set(QStringLiteral("status"), mprisInterface.playbackStatus());
>  

What does this status send that we don't have now?

REPOSITORY
  R224 KDE Connect

REVISION DETAIL
  https://phabricator.kde.org/D8957

To: mtijink, #kde_connect, apol
Cc: apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20171122/a7d152dc/attachment-0001.html>


More information about the KDEConnect mailing list