Mercurial > audlegacy
comparison contrib/xchat-audacious.py @ 2756:987df858ae76 trunk
[svn] - final version of the /sendtrack command. :(
author | nenolod |
---|---|
date | Fri, 11 May 2007 21:30:39 -0700 |
parents | 8c8c2c89082f |
children | 6f38159839be |
comparison
equal
deleted
inserted
replaced
2755:8c8c2c89082f | 2756:987df858ae76 |
---|---|
4 # | 4 # |
5 # To consider later: | 5 # To consider later: |
6 # - support org.freedesktop.MediaPlayer (MPRIS)? | 6 # - support org.freedesktop.MediaPlayer (MPRIS)? |
7 # | 7 # |
8 # This script is in the public domain. | 8 # This script is in the public domain. |
9 # $Id: xchat-audacious.py 4536 2007-05-12 04:29:36Z nenolod $ | 9 # $Id: xchat-audacious.py 4538 2007-05-12 04:30:39Z nenolod $ |
10 # | 10 # |
11 | 11 |
12 __module_name__ = "xchat-audacious" | 12 __module_name__ = "xchat-audacious" |
13 __module_version__ = "1.0" | 13 __module_version__ = "1.0" |
14 __module_description__ = "Get NP information from Audacious" | 14 __module_description__ = "Get NP information from Audacious" |
59 if len(word) < 1: | 59 if len(word) < 1: |
60 print "You must provide a user to send the track to." | 60 print "You must provide a user to send the track to." |
61 return xchat.EAT_ALL | 61 return xchat.EAT_ALL |
62 | 62 |
63 aud = bus.get_object('org.atheme.audacious', '/org/atheme/audacious') | 63 aud = bus.get_object('org.atheme.audacious', '/org/atheme/audacious') |
64 xchat.command("DCC SEND %s \"%s\"" % (word[0], aud.SongFilename(aud.Position()))) | 64 xchat.command("DCC SEND %s \"%s\"" % (word[1], aud.SongFilename(aud.Position()))) |
65 return xchat.EAT_ALL | 65 return xchat.EAT_ALL |
66 | 66 |
67 xchat.hook_command("NP", command_np, help="Displays current playing song.") | 67 xchat.hook_command("NP", command_np, help="Displays current playing song.") |
68 xchat.hook_command("NEXT", command_next, help="Advances in Audacious' playlist.") | 68 xchat.hook_command("NEXT", command_next, help="Advances in Audacious' playlist.") |
69 xchat.hook_command("PREV", command_prev, help="Goes backwards in Audacious' playlist.") | 69 xchat.hook_command("PREV", command_prev, help="Goes backwards in Audacious' playlist.") |
70 xchat.hook_command("PAUSE", command_pause, help="Toggles paused status.") | 70 xchat.hook_command("PAUSE", command_pause, help="Toggles paused status.") |
71 xchat.hook_command("STOP", command_stop, help="Stops playback.") | 71 xchat.hook_command("STOP", command_stop, help="Stops playback.") |
72 xchat.hook_command("PLAY", command_play, help="Begins playback.") | 72 xchat.hook_command("PLAY", command_play, help="Begins playback.") |
73 xchat.hook_command("SENDTRACK", command_send, help="Sends the currently playing track to a user.") | 73 xchat.hook_command("SENDTRACK", command_send, help="Sends the currently playing track to a user.") |
74 | 74 |
75 print "xchat-audacious $Id: xchat-audacious.py 4536 2007-05-12 04:29:36Z nenolod $ loaded" | 75 print "xchat-audacious $Id: xchat-audacious.py 4538 2007-05-12 04:30:39Z nenolod $ loaded" |