Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 http://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 http://stackoverflow.com/questions/7671763/error-setting-status-to-empathy-with-dbus/8160857#8160857

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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)
share|improve this answer
    
I know I shd have updated the question here too. I've posted the question over ther I can't accpet your answer bt thanx –  pahnin Nov 28 '11 at 17:29

The script suggested in comments worked for me after a aptitude install libtelepathy-glib-dev.

share|improve this answer
1  
I know I shd have updated the question here too. I've posted the question over ther I can't accpet your answer bt thanx –  pahnin Nov 28 '11 at 17:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.