Created
April 11, 2009 08:04
-
-
Save gnuget/93495 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
#Author: David Valdez | |
#Correo: david.valdez210[arroba]gmail.com | |
#Commands: | |
# rola.py | |
version = "1.0" | |
__module_name__ = "rola-banshee.py" | |
__module_version__ = version | |
import dbus | |
import xchat | |
class Rola: | |
def __init__(self): | |
self.banshee = dbus.SessionBus() | |
self.banshee = self.banshee.get_object("org.bansheeproject.Banshee","/org/bansheeproject/Banshee/PlayerEngine") | |
xchat.prnt("rola-banshee.py Version %s loaded!" % (version)) | |
xchat.prnt("/rola") | |
def rola(self,word,word_eol,userdata): | |
song = self.banshee.GetCurrentTrack()['name'] | |
artist = self.banshee.GetCurrentTrack()['artist'] | |
xchat.command("me esta escuchando: %s - %s" %(artist,song)) | |
return xchat.EAT_XCHAT | |
control = Rola() | |
xchat.hook_command("rola",control.rola) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment