1
0
mirror of https://gitlab.xiph.org/xiph/ezstream.git synced 2024-12-04 14:46:31 -05:00

Warn, in verbose mode, when dealing with empty playlists.

git-svn-id: https://svn.xiph.org/trunk/ezstream@13802 0101bb08-14d6-0310-b084-bc0e0c8e3800
This commit is contained in:
moritz 2007-09-14 07:01:18 +00:00
parent 1086dc4f15
commit 87c01b03ad

View File

@ -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);