mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 15:37:23 +00:00
add patch for mpris
This commit is contained in:
parent
acc4df92bc
commit
a4d3a09f26
25
patches/fix-mpris-engine.patch
Normal file
25
patches/fix-mpris-engine.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
diff --git a/sources/extsysmonsources/playersource.cpp b/sources/extsysmonsources/playersource.cpp
|
||||||
|
index b8a0ec1..17d90bc 100644
|
||||||
|
--- a/sources/extsysmonsources/playersource.cpp
|
||||||
|
+++ b/sources/extsysmonsources/playersource.cpp
|
||||||
|
@@ -73,8 +73,10 @@ QString PlayerSource::getAutoMpris() const
|
||||||
|
{
|
||||||
|
QDBusMessage listServices = QDBusConnection::sessionBus().interface()->call(
|
||||||
|
QDBus::BlockWithGui, "ListNames");
|
||||||
|
- if (listServices.arguments().isEmpty())
|
||||||
|
+ if (listServices.arguments().isEmpty()) {
|
||||||
|
+ qCWarning(LOG_ESS) << "Could not find any DBus service";
|
||||||
|
return "";
|
||||||
|
+ }
|
||||||
|
QStringList arguments = listServices.arguments().first().toStringList();
|
||||||
|
|
||||||
|
for (auto &arg : arguments) {
|
||||||
|
@@ -353,7 +355,7 @@ QVariantHash PlayerSource::getPlayerMprisInfo(const QString &_mpris) const
|
||||||
|
= QVariantList({"org.mpris.MediaPlayer2.Player", "Metadata"});
|
||||||
|
QDBusMessage request = QDBusMessage::createMethodCall(
|
||||||
|
QString("org.mpris.MediaPlayer2.%1").arg(_mpris),
|
||||||
|
- "/org/mpris/MediaPlayer2", "", "Get");
|
||||||
|
+ "/org/mpris/MediaPlayer2", "org.freedesktop.DBus.Properties", "Get");
|
||||||
|
request.setArguments(args);
|
||||||
|
QDBusMessage response
|
||||||
|
= bus.call(request, QDBus::BlockWithGui, REQUEST_TIMEOUT);
|
Loading…
Reference in New Issue
Block a user