From a96eb68e154aa21399cf8ec4793dd0ac6fdea3c9 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <PromyLOPh@gmail.com>
Date: Sat, 28 Jun 2008 14:27:58 +0200
Subject: client: Upcoming songs list

---
 src/main.c     | 17 ++++++++++++++++-
 src/pianobar.1 |  4 ++++
 2 files changed, 20 insertions(+), 1 deletion(-)

(limited to 'src')

diff --git a/src/main.c b/src/main.c
index aa338eb..e4b8457 100644
--- a/src/main.c
+++ b/src/main.c
@@ -375,7 +375,8 @@ int main (int argc, char **argv) {
 							"q\tquit\n"
 							"r\trename current station\n"
 							"s\tchange station\n"
-							"t\ttired (ban song for 1 month)\n");
+							"t\ttired (ban song for 1 month)\n"
+							"u\tupcoming songs\n");
 					break;
 
 				case 'a':
@@ -548,6 +549,20 @@ int main (int argc, char **argv) {
 					}
 					break;
 
+				case 'u':
+					if (curStation == NULL || curSong == NULL) {
+						BarUiMsg ("No song playing.\n");
+						break;
+					}
+					BarUiMsg ("Next songs:\n");
+					PianoSong_t *nextSong = curSong->next;
+					while (nextSong != NULL) {
+						printf ("%s -- %s\n", nextSong->artist,
+								nextSong->title);
+						nextSong = nextSong->next;
+					}
+					break;
+
 			} /* end case */
 		} /* end poll */
 
diff --git a/src/pianobar.1 b/src/pianobar.1
index af9751a..bcd5f21 100644
--- a/src/pianobar.1
+++ b/src/pianobar.1
@@ -63,6 +63,10 @@ Play another station.
 .B t
 Ban song for one month.
 
+.TP
+.B u
+Show next songs in playlist.
+
 .SH FILES
 .I $XDG_CONFIG_HOME/pianobar/config
 or
-- 
cgit v1.2.3