From 7168d9107de85d7d4b422418673c726c4df586f0 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <PromyLOPh@gmail.com>
Date: Tue, 24 Jun 2008 13:18:56 +0200
Subject: piano/client: Move song implemented

---
 src/main.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

(limited to 'src')

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;
-- 
cgit v1.2.3