mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 23:47:20 +00:00
commit
1a5caee4bc
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);
|
@ -167,8 +167,8 @@ Item {
|
|||||||
'name': 'clementine'
|
'name': 'clementine'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'label': 'deadbeef',
|
'label': 'DeaDBeeF',
|
||||||
'name': 'deadbeef'
|
'name': 'DeaDBeeF'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'label': 'vlc',
|
'label': 'vlc',
|
||||||
|
@ -73,8 +73,10 @@ QString PlayerSource::getAutoMpris() const
|
|||||||
{
|
{
|
||||||
QDBusMessage listServices = QDBusConnection::sessionBus().interface()->call(
|
QDBusMessage listServices = QDBusConnection::sessionBus().interface()->call(
|
||||||
QDBus::BlockWithGui, "ListNames");
|
QDBus::BlockWithGui, "ListNames");
|
||||||
if (listServices.arguments().isEmpty())
|
if (listServices.arguments().isEmpty()) {
|
||||||
|
qCWarning(LOG_ESS) << "Could not find any DBus service";
|
||||||
return "";
|
return "";
|
||||||
|
}
|
||||||
QStringList arguments = listServices.arguments().first().toStringList();
|
QStringList arguments = listServices.arguments().first().toStringList();
|
||||||
|
|
||||||
for (auto &arg : arguments) {
|
for (auto &arg : arguments) {
|
||||||
@ -353,7 +355,7 @@ QVariantHash PlayerSource::getPlayerMprisInfo(const QString &_mpris) const
|
|||||||
= QVariantList({"org.mpris.MediaPlayer2.Player", "Metadata"});
|
= QVariantList({"org.mpris.MediaPlayer2.Player", "Metadata"});
|
||||||
QDBusMessage request = QDBusMessage::createMethodCall(
|
QDBusMessage request = QDBusMessage::createMethodCall(
|
||||||
QString("org.mpris.MediaPlayer2.%1").arg(_mpris),
|
QString("org.mpris.MediaPlayer2.%1").arg(_mpris),
|
||||||
"/org/mpris/MediaPlayer2", "", "Get");
|
"/org/mpris/MediaPlayer2", "org.freedesktop.DBus.Properties", "Get");
|
||||||
request.setArguments(args);
|
request.setArguments(args);
|
||||||
QDBusMessage response
|
QDBusMessage response
|
||||||
= bus.call(request, QDBus::BlockWithGui, REQUEST_TIMEOUT);
|
= bus.call(request, QDBus::BlockWithGui, REQUEST_TIMEOUT);
|
||||||
|
Loading…
Reference in New Issue
Block a user