diff options
author | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-07-18 15:09:52 +0200 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-07-18 15:09:52 +0200 |
commit | 98813251e60234aac43ef41090980f2771ce2360 (patch) | |
tree | 57fbb8daa03cbf32e87c2a764d6420a0d1959cb7 | |
parent | 61fb2bbea159dd47e9c92b27045e1662064cb83b (diff) | |
download | pianobar-98813251e60234aac43ef41090980f2771ce2360.tar.gz pianobar-98813251e60234aac43ef41090980f2771ce2360.tar.bz2 pianobar-98813251e60234aac43ef41090980f2771ce2360.zip |
Improve next songs output
-rw-r--r-- | src/main.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -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; |