summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@gmail.com>2008-07-18 15:09:52 +0200
committerLars-Dominik Braun <PromyLOPh@gmail.com>2008-07-18 15:09:52 +0200
commit98813251e60234aac43ef41090980f2771ce2360 (patch)
tree57fbb8daa03cbf32e87c2a764d6420a0d1959cb7
parent61fb2bbea159dd47e9c92b27045e1662064cb83b (diff)
downloadpianobar-98813251e60234aac43ef41090980f2771ce2360.tar.gz
pianobar-98813251e60234aac43ef41090980f2771ce2360.tar.bz2
pianobar-98813251e60234aac43ef41090980f2771ce2360.zip
Improve next songs output
-rw-r--r--src/main.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index 70026b1..cd92e73 100644
--- a/src/main.c
+++ b/src/main.c
@@ -636,12 +636,18 @@ int main (int argc, char **argv) {
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;
+ if (nextSong != NULL) {
+ int i = 0;
+ BarUiMsg ("Next songs:\n");
+ while (nextSong != NULL) {
+ printf ("%2i) \"%s\" by \"%s\"\n", i,
+ nextSong->title, nextSong->artist);
+ nextSong = nextSong->next;
+ i++;
+ }
+ } else {
+ BarUiMsg ("No songs in queue.\n");
}
break;