Mercurial > audlegacy
diff src/audtool/audtool_handlers_playqueue.c @ 3867:e48f2f4c116d
- many remained audacious remote functions have been implemented.
- audtool improvement in progress.
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Mon, 29 Oct 2007 22:21:42 +0900 |
parents | 7be518cc8e60 |
children | f3341c2d6b9e |
line wrap: on
line diff
--- a/src/audtool/audtool_handlers_playqueue.c Sun Oct 28 21:37:05 2007 +0100 +++ b/src/audtool/audtool_handlers_playqueue.c Mon Oct 29 22:21:42 2007 +0900 @@ -101,11 +101,15 @@ audtool_whine("invalid playlist position %d", i); return; } - - exit(!(audacious_remote_playqueue_is_queued(dbus_proxy, i - 1))); + if(audacious_remote_playqueue_is_queued(dbus_proxy, i - 1)) { + audtool_report("OK"); + exit(0); + } + else + exit(1); } -void playqueue_get_position(gint argc, gchar **argv) +void playqueue_get_queue_position(gint argc, gchar **argv) { gint i, pos; @@ -124,7 +128,7 @@ return; } - pos = audacious_remote_get_playqueue_position(dbus_proxy, i - 1) + 1; + pos = audacious_remote_get_playqueue_queue_position(dbus_proxy, i - 1) + 1; if (pos < 1) return; @@ -132,7 +136,7 @@ audtool_report("%d", pos); } -void playqueue_get_qposition(gint argc, gchar **argv) +void playqueue_get_list_position(gint argc, gchar **argv) { gint i, pos; @@ -151,7 +155,7 @@ return; } - pos = audacious_remote_get_playqueue_queue_position(dbus_proxy, i - 1) + 1; + pos = audacious_remote_get_playqueue_list_position(dbus_proxy, i - 1) + 1; if (pos < 1) return; @@ -174,7 +178,7 @@ for (ii = 0; ii < i; ii++) { - position = audacious_remote_get_playqueue_queue_position(dbus_proxy, ii); + position = audacious_remote_get_playqueue_list_position(dbus_proxy, ii); songname = audacious_remote_get_playlist_title(dbus_proxy, position); frames = audacious_remote_get_playlist_time(dbus_proxy, position); length = frames / 1000;