Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 999  / 3 Years ago, mon, october 18, 2021, 2:41:30

Any plugin available to set Clementine's current playing song as empathy status



[update]



I've tried it and was not succesful, here is my problem https://stackoverflow.com/questions/7671763/error-setting-status-to-empathy-with-dbus/7760194#7760194



but I've figured out that it is not possible to set status of empathy through dbus



http://telepathy.freedesktop.org/spec/Connection_Interface_Simple_Presence.html#Method:SetPresence



regards



[update]
answer found on stack overflow link given above
https://stackoverflow.com/questions/7671763/error-setting-status-to-empathy-with-dbus/8160857#8160857


More From » empathy

 Answers
4

It has been suggested that this Stack Overflow Question answers the subject:



import dbus
session_bus = dbus.SessionBus()
player = session_bus.get_object('org.mpris.clementine', '/Player')
iface = dbus.Interface(player, dbus_interface='org.freedesktop.MediaPlayer')
metadata = iface.GetMetadata()
status = "♫ ".decode('utf8')+metadata["title"]+' - '+metadata["album"]+" ♫".decode('utf8')
print status
from gi.repository import TelepathyGLib as Tp
from gi.repository import GObject
loop = GObject.MainLoop()
am = Tp.AccountManager.dup()
am.prepare_async(None, lambda *args: loop.quit(), None)
loop.run()
am.set_all_requested_presences(Tp.ConnectionPresenceType.AVAILABLE,
'available', status)

[#43231] Tuesday, October 19, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cklaceowne

Total Points: 228
Total Questions: 102
Total Answers: 111

Location: Ivory Coast
Member since Sun, Mar 7, 2021
3 Years ago
;