From bfbb8e26d6b89cef9d496246f0f6a64e3f3eafb5 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 22 Jul 2008 17:22:27 +0200 Subject: Show error message when receiving a new playlist failed ... instead of showing "No tracks left." --- src/main.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 56d921f..90c3feb 100644 --- a/src/main.c +++ b/src/main.c @@ -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) { -- cgit v1.2.3