Always play when call ended

Summary:
When the music is resumed during the call it was paused again when the call ends

Bug: 400787

Test Plan: Get called, resume music during call, check state after call

Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16809
This commit is contained in:
Nicolas Fella 2018-11-15 00:46:05 +01:00
parent a4aef73312
commit 188adfbee7

View file

@ -100,7 +100,7 @@ bool PauseMusicPlugin::receivePacket(const NetworkPacket& np)
if (pause && !pausedSources.empty()) {
for (const QString& iface : qAsConst(pausedSources)) {
QDBusInterface mprisInterface(iface, QStringLiteral("/org/mpris/MediaPlayer2"), QStringLiteral("org.mpris.MediaPlayer2.Player"));
mprisInterface.asyncCall(QStringLiteral("PlayPause"));
mprisInterface.asyncCall(QStringLiteral("Play"));
}
pausedSources.clear();
}