ido.nl.eu.org/exaile/xchatscript/

Exaile Python Script

Information

Script to control and display Exaile information/tracks in X-Chat. This script is made by Sonic http://blog.sonic88.org/2007/09/22/exaile-plugin-for-x-chat/ not by me.

This page only has patches for the orginal script that solves problems i found while using the script.

Patches

Shoutcast Support:

--- exaile.py.org	2008-01-12 16:31:33.000000000 +0100
+++ exaile.py	2008-01-12 16:30:29.000000000 +0100
@@ -81,10 +81,11 @@
 		return xchat.EAT_ALL
 	try:
 		position = int(get_position())
+		location = exa.get_track_attr('loc')
 	except:
 		print "Error during trying to comunicate with exaile!"
 		return xchat.EAT_ALL
-	if not position:
+	if not position and not '://' in location:
 		print "Exaile is stopped or not running!"
 		return xchat.EAT_ALL
 	title = get_title()
@@ -94,8 +95,11 @@
 	album = get_album()
 	album = album.encode("utf-8")
 	length = get_length()
-	#xchat.command ("me is listening to " + artist + " - " + title + " [" + str(length) + " (" + str(position) + "%)]")
-	xchat.command ("me is listening to (" + str(title) + ") by (" + str(artist) + ") from (" + str(album) + ") [" + str(length) + "] in his Exaile")
+	if '://' in location:
+	    xchat.command ("me is listening to (" + str(title) + ") by (" + str(artist) + ") from (" + str(album) + ") in his Exaile")
+	else:
+	    #xchat.command ("me is listening to " + artist + " - " + title + " [" + str(length) + " (" + str(position) + "%)]")
+	    xchat.command ("me is listening to (" + str(title) + ") by (" + str(artist) + ") from (" + str(album) + ") [" + str(length) + "] in his Exaile")
 	return xchat.EAT_ALL
A Django site.