1
0
mirror of https://gitlab.xiph.org/xiph/ezstream.git synced 2024-11-03 04:17:18 -05:00

Fix media type handing wrt playlists

This was a regression introduced by the cfg refactor
This commit is contained in:
Moritz Grimm 2015-05-27 00:21:44 +02:00
parent 74dce6af5b
commit aab0afaa82

View File

@ -935,15 +935,22 @@ streamPlaylist(shout_t *shout)
char lastSong[PATH_MAX];
if (playlist == NULL) {
if (CFG_MEDIA_PROGRAM == cfg_get_media_type()) {
switch (cfg_get_media_type()) {
case CFG_MEDIA_PROGRAM:
if ((playlist = playlist_program(cfg_get_media_filename())) == NULL)
return (0);
} else {
break;
case CFG_MEDIA_STDIN:
if ((playlist = playlist_read(NULL)) == NULL)
return (0);
break;
default:
if ((playlist = playlist_read(cfg_get_media_filename())) == NULL)
return (0);
if (playlist_get_num_items(playlist) == 0)
log_notice("%s: playlist empty",
log_warning("%s: playlist empty",
cfg_get_media_filename());
break;
}
} else {
/*