Commit 02eb9a58 authored by Albert Vaca Cintora's avatar Albert Vaca Cintora

Made mpris plugin less verbose

parent dbaa6660
......@@ -89,7 +89,7 @@ void MprisControlPlugin::addPlayer(const QString& service)
}
void MprisControlPlugin::seeked(qlonglong position){
kDebug(debugArea()) << "Seeked in player";
//kDebug(debugArea()) << "Seeked in player";
NetworkPackage np(PACKAGE_TYPE_MPRIS);
np.set("pos", position/1000); //Send milis instead of nanos
OrgFreedesktopDBusPropertiesInterface* interface = (OrgFreedesktopDBusPropertiesInterface*)sender();
......@@ -183,7 +183,7 @@ bool MprisControlPlugin::receivePackage (const NetworkPackage& np)
OrgMprisMediaPlayer2PlayerInterface mprisInterface(playerList[player], "/org/mpris/MediaPlayer2", QDBusConnection::sessionBus());
if (np.has("action")) {
const QString& action = np.get<QString>("action");
kDebug(debugArea()) << "Calling action" << action << "in" << playerList[player];
//kDebug(debugArea()) << "Calling action" << action << "in" << playerList[player];
//TODO: Check for valid actions, currently we trust anything the other end sends us
mprisInterface.call(action);
}
......@@ -194,14 +194,14 @@ bool MprisControlPlugin::receivePackage (const NetworkPackage& np)
}
if (np.has("Seek")) {
int offset = np.get<int>("Seek");
kDebug(debugArea()) << "Seeking" << offset << "to" << playerList[player];
//kDebug(debugArea()) << "Seeking" << offset << "to" << playerList[player];
mprisInterface.Seek(offset);
}
if (np.has("SetPosition")){
qlonglong position = np.get<qlonglong>("SetPosition",0)*1000;
qlonglong seek = position - mprisInterface.position();
kDebug(debugArea()) << "Setting position by seeking" << seek << "to" << playerList[player];
//kDebug(debugArea()) << "Setting position by seeking" << seek << "to" << playerList[player];
mprisInterface.Seek(seek);
}
......
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