Commit 2a55be4a authored by Albert Vaca Cintora's avatar Albert Vaca Cintora

Found a bug, added a FIXME because I do not have time for it

parent afc98679
......@@ -73,9 +73,10 @@ void MprisControlPlugin::serviceOwnerChanged(const QString &name,
void MprisControlPlugin::addPlayer(const QString& service)
{
QDBusInterface mprisInterface(service, "/org/mpris/MediaPlayer2", "org.mpris.MediaPlayer2");
//FIXME: This call hangs and returns an empty string if KDED is still starting!
const QString& identity = mprisInterface.property("Identity").toString();
playerList[identity] = service;
qDebug() << "addPlayer" << service << identity;
qDebug() << "Mpris addPlayer" << service << "->" << identity;
sendPlayerList();
OrgFreedesktopDBusPropertiesInterface* freedesktopInterface = new OrgFreedesktopDBusPropertiesInterface(service, "/org/mpris/MediaPlayer2", QDBusConnection::sessionBus(), this);
......@@ -128,7 +129,9 @@ void MprisControlPlugin::propertiesChanged(const QString& propertyInterface, con
void MprisControlPlugin::removePlayer(const QString& ifaceName)
{
playerList.remove(playerList.key(ifaceName));
QString identity = playerList.key(ifaceName);
qDebug() << "Mpris removePlayer" << ifaceName << "->" << identity;
playerList.remove(identity);
sendPlayerList();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment