summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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;