summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-24 13:18:56 +0200
committerLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-24 13:18:56 +0200
commit7168d9107de85d7d4b422418673c726c4df586f0 (patch)
tree4cc4fef011946dfa64ea72fbed66beefcf17e221 /src
parentacae467b661dff6839c3d23da08cd21c3967c419 (diff)
downloadpianobar-7168d9107de85d7d4b422418673c726c4df586f0.tar.gz
pianobar-7168d9107de85d7d4b422418673c726c4df586f0.tar.bz2
pianobar-7168d9107de85d7d4b422418673c726c4df586f0.zip
piano/client: Move song implemented
Diffstat (limited to 'src')
-rw-r--r--src/main.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 51ab7cb..5149428 100644
--- a/src/main.c
+++ b/src/main.c
@@ -320,6 +320,7 @@ int main (int argc, char **argv) {
struct pollfd polls = {fileno (stdin), POLLIN, POLLIN};
char buf, yesnoBuf;
char *lineBuf, *musicId;
+ PianoStation_t *moveStation;
if (poll (&polls, 1, 1000) > 0) {
read (fileno (stdin), &buf, sizeof (buf));
@@ -417,6 +418,21 @@ int main (int argc, char **argv) {
case 'n':
player.doQuit = 1;
break;
+
+ case 'm':
+ moveStation = BarUiSelectStation (&ph);
+ if (moveStation != NULL) {
+ printf ("Moving song to \"%s\"...", moveStation->name);
+ fflush (stdout);
+ if (PianoMoveSong (&ph, curStation, moveStation,
+ curSong) == PIANO_RET_OK) {
+ printf ("Ok.\n");
+ player.doQuit = 1;
+ } else {
+ printf ("Error.\n");
+ }
+ }
+ break;
case 'p':
player.doPause = !player.doPause;