diff contrib/xchat-audacious.py @ 2759:0c9bb15a4321 trunk

[svn] - encode songtitle in utf8 before passing to XChat.
author nenolod
date Fri, 11 May 2007 21:57:25 -0700
parents c888facd2c0d
children c5dec731eff6
line wrap: on
line diff
--- a/contrib/xchat-audacious.py	Fri May 11 21:48:49 2007 -0700
+++ b/contrib/xchat-audacious.py	Fri May 11 21:57:25 2007 -0700
@@ -6,7 +6,7 @@
 #   - support org.freedesktop.MediaPlayer (MPRIS)?
 #
 # This script is in the public domain.
-#   $Id: xchat-audacious.py 4542 2007-05-12 04:48:49Z nenolod $
+#   $Id: xchat-audacious.py 4544 2007-05-12 04:57:25Z nenolod $
 #
 
 __module_name__ = "xchat-audacious"
@@ -29,7 +29,7 @@
 				      aud.SongLength(aud.Position()) % 60)
 
 	xchat.command("SAY [%s | %d:%02d/%s]" % (
-		aud.SongTitle(aud.Position()),
+		aud.SongTitle(aud.Position()).encode("utf8"),
 		aud.Time() / 1000 / 60, aud.Time() / 1000 % 60,
 		length))
 
@@ -72,4 +72,4 @@
 xchat.hook_command("PLAY", command_play, help="Begins playback.")
 xchat.hook_command("SENDTRACK", command_send, help="Sends the currently playing track to a user.")
 
-print "xchat-audacious $Id: xchat-audacious.py 4542 2007-05-12 04:48:49Z nenolod $ loaded"
+print "xchat-audacious $Id: xchat-audacious.py 4544 2007-05-12 04:57:25Z nenolod $ loaded"