Posts Tagged dbus
rola_songbird.py
Based on the script published by gnuget rola-banshee.py this is a little hack to work with songbird 1.1.1 using the dbus add-on, with 1.1.2 don’t work because the add-on didn’t work with the new version
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#Author: Isaac I. Torres
#Correo: istodi[arroba]gmail[punto]com
#Based on rola-banshee.py http://gnuget.underlife.org/blog/view/203/rola-banshee-py
version = "1.0"
__module_name__ = "rola_songbird.py"
__module_version__ = version
import dbus
import xchat
class RolaSongbird:
def __init__(self):
self.songbird = dbus.SessionBus()
self.songbird = self.songbird.get_object("org.mozilla.songbird","/org/mozilla/songbird")
xchat.prnt("rola-songbird.py Version %s loaded!" % (version))
xchat.prnt("/rola")
def rola(self, word, word_eol, userdata):
song = self.songbird.getTitle()
artist = self.songbird.getArtist()
xchat.command("me esta escuchando: %s - %s" % (artist, song))
return xchat.EAT_XCHAT
control = RolaSongbird()
xchat.hook_command("rola", control.rola)
May 1, 2009