From 87c01b03ada655a1c67cfa580996123f58cfe371 Mon Sep 17 00:00:00 2001 From: moritz Date: Fri, 14 Sep 2007 07:01:18 +0000 Subject: [PATCH] Warn, in verbose mode, when dealing with empty playlists. git-svn-id: https://svn.xiph.org/trunk/ezstream@13802 0101bb08-14d6-0310-b084-bc0e0c8e3800 --- src/ezstream.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ezstream.c b/src/ezstream.c index b6de260..614fb13 100644 --- a/src/ezstream.c +++ b/src/ezstream.c @@ -980,14 +980,21 @@ streamPlaylist(shout_t *shout, const char *fileName) } else { if ((playlist = playlist_read(fileName)) == NULL) return (0); + if (vFlag && playlist_get_num_items(playlist) == 0) + printf("%s: Warning: Playlist '%s' is empty\n", + __progname, fileName); } - } else + } else { /* * XXX: This preserves traditional behavior, however, * rereading the playlist after each walkthrough seems a * bit more logical. */ playlist_rewind(playlist); + if (vFlag && playlist_get_num_items(playlist) == 0) + printf("%s: Warning: Playlist '%s' is empty\n", + __progname, fileName); + } if (!pezConfig->fileNameIsProgram && pezConfig->shuffle) playlist_shuffle(playlist);