Mercurial > audlegacy
diff contrib/xchat-audacious.py @ 2749:96e7c0385973 trunk
[svn] - add stop, pause, next, prev, play functions
author | nenolod |
---|---|
date | Fri, 11 May 2007 21:19:21 -0700 |
parents | a67712c75069 |
children | 4df1d5552a4d |
line wrap: on
line diff
--- a/contrib/xchat-audacious.py Fri May 11 20:37:03 2007 -0700 +++ b/contrib/xchat-audacious.py Fri May 11 21:19:21 2007 -0700 @@ -32,4 +32,26 @@ return xchat.EAT_ALL +def command_next(word, word_eol, userdata): + bus.get_object('org.atheme.audacious', '/org/atheme/audacious').Next() + +def command_prev(word, word_eol, userdata): + bus.get_object('org.atheme.audacious', '/org/atheme/audacious').Reverse() + +def command_pause(word, word_eol, userdata): + bus.get_object('org.atheme.audacious', '/org/atheme/audacious').Pause() + +def command_stop(word, word_eol, userdata): + bus.get_object('org.atheme.audacious', '/org/atheme/audacious').Stop() + +def command_play(word, word_eol, userdata): + bus.get_object('org.atheme.audacious', '/org/atheme/audacious').Play() + xchat.hook_command("NP", command_np, help="Displays current playing song.") +xchat.hook_command("NEXT", command_next, help="Advances in Audacious' playlist.") +xchat.hook_command("PREV", command_prev, help="Goes backwards in Audacious' playlist.") +xchat.hook_command("PAUSE", command_np, help="Toggles paused status.") +xchat.hook_command("STOP", command_np, help="Stops playback.") +xchat.hook_command("PLAY", command_np, help="Begins playback.") + +print "xchat-audacious $Id: xchat-audacious.py 4524 2007-05-12 04:19:21Z nenolod $ loaded"