Advertisement
lukibeni

XChat Banshee Script

Aug 19th, 2011
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.37 KB | None | 0 0
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3.  
  4. __module_name__ = "Banshee Info"
  5. __module_version__  = "0.2"
  6. __module_description__  = "Banshee Info Script"
  7.  
  8. import xchat
  9. import commands
  10.  
  11. def banshee(word,word_eol,userdata):
  12.     artist = commands.getoutput("banshee --query-artist | cut -c 9-")
  13.     album = commands.getoutput("banshee --query-album | cut -c 8-")
  14.     title = commands.getoutput("banshee --query-title | cut -c 8-")
  15.     bit = commands.getoutput("banshee --query-bit-rate | cut -c 11-")
  16.     year = commands.getoutput("banshee --query-year | cut -c 7-")
  17.     version = commands.getoutput("banshee --version | grep banshee | cut -c 1-19")
  18.     if year == "": xchat.command("me éppen a(z) " + title + " című számot hallgatja " + artist + " előadó " + album + " című albumáról. (" + bit + " kbit/s) :: " + version)
  19.     else:
  20.         if album == "": xchat.command("me éppen a(z) " + title + " című számot hallgatja " + artist + " előadótól. (" + bit + " kbit/s) :: " + version)
  21.         else: 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) :: " + version)
  22.     return xchat.EAT_ALL
  23. xchat.hook_command("banshee2", banshee, help="Kiírja a Banshee által lejátszott zeneszám adatait.")
  24.  
  25. print "XChat2 Banshee Info Script Betöltve"
  26. # Másold be a ./xchat2 mappába valami.py néven
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement