diff options
author | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-07-22 17:22:27 +0200 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-07-22 17:22:27 +0200 |
commit | bfbb8e26d6b89cef9d496246f0f6a64e3f3eafb5 (patch) | |
tree | de1a15c1327d89a319382a3074e0fd8905ba7d58 | |
parent | 9f0655556d93b2e237f3e94af8b27d4bbc0940c5 (diff) | |
download | pianobar-bfbb8e26d6b89cef9d496246f0f6a64e3f3eafb5.tar.gz pianobar-bfbb8e26d6b89cef9d496246f0f6a64e3f3eafb5.tar.bz2 pianobar-bfbb8e26d6b89cef9d496246f0f6a64e3f3eafb5.zip |
Show error message when receiving a new playlist failed
... instead of showing "No tracks left."
-rw-r--r-- | src/main.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -404,13 +404,17 @@ int main (int argc, char **argv) { if (curSong == NULL) { BarUiMsg ("Receiving new playlist... "); PianoDestroyPlaylist (&ph); - PianoGetPlaylist (&ph, curStation->id); - curSong = ph.playlist; - if (curSong == NULL) { - BarUiMsg ("No tracks left.\n"); - curStation = NULL; + if (PianoGetPlaylist (&ph, curStation->id) != + PIANO_RET_OK) { + BarUiMsg ("Error.\n"); } else { - BarUiMsg ("Ok.\n"); + curSong = ph.playlist; + if (curSong == NULL) { + BarUiMsg ("No tracks left.\n"); + curStation = NULL; + } else { + BarUiMsg ("Ok.\n"); + } } } if (curSong != NULL) { |