Advertisement
lukibeni

XChat Banshee Script

Aug 14th, 2011
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.96 KB | None | 0 0
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3.  
  4. __module_name__ = "Banshee Info"
  5. __module_version__  = "0.1"
  6. __module_description__  = "Banshee Info Script"
  7.  
  8. import xchat
  9. import commands
  10.  
  11. def banshee(word,word_eol,userdata):
  12.         stop = commands.getoutput("banshee --query-current-state | cut -c 16-")
  13.         artist = commands.getoutput("banshee --query-artist | cut -c 9-")
  14.     album = commands.getoutput("banshee --query-album | cut -c 8-")
  15.         title = commands.getoutput("banshee --query-title | cut -c 8-")
  16.     bit = commands.getoutput("banshee --query-bit-rate | cut -c 11-")
  17.     year = commands.getoutput("banshee --query-year | cut -c 7-")
  18.     xchat.command("me éppen a(z) " + title + " című számot hallgatja " + artist + " előadó " + album + " (" + year + ") című albumáról. (" + bit + " kbit/s)")
  19.     return xchat.EAT_ALL
  20. xchat.hook_command("banshee", banshee, help="Kiírja a Banshee által lejátszott zeneszám adatait.")
  21.  
  22. print "XChat2 Banshee Info Script"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement