diff options
author | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-06-24 13:18:56 +0200 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-06-24 13:18:56 +0200 |
commit | 7168d9107de85d7d4b422418673c726c4df586f0 (patch) | |
tree | 4cc4fef011946dfa64ea72fbed66beefcf17e221 /src/main.c | |
parent | acae467b661dff6839c3d23da08cd21c3967c419 (diff) | |
download | pianobar-7168d9107de85d7d4b422418673c726c4df586f0.tar.gz pianobar-7168d9107de85d7d4b422418673c726c4df586f0.tar.bz2 pianobar-7168d9107de85d7d4b422418673c726c4df586f0.zip |
piano/client: Move song implemented
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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; |