playlist/Print: don't skip non-existent songs in "listplaylist"
Skipping those songs silently will confuse the client, because commands specifying the song index within a playlist (e.g. playlistdelete) will be out of sync. This copies spl_print()'s behavior to playlist_file_print().
This commit is contained in:
parent
8904127c10
commit
0cfd4fff62
2
NEWS
2
NEWS
@ -1,4 +1,6 @@
|
|||||||
ver 0.19.7 (not yet released)
|
ver 0.19.7 (not yet released)
|
||||||
|
* playlist
|
||||||
|
- don't skip non-existent songs in "listplaylist"
|
||||||
|
|
||||||
ver 0.19.6 (2014/12/08)
|
ver 0.19.6 (2014/12/08)
|
||||||
* decoder
|
* decoder
|
||||||
|
@ -43,12 +43,13 @@ playlist_provider_print(Client &client, const char *uri,
|
|||||||
DetachedSong *song;
|
DetachedSong *song;
|
||||||
while ((song = e.NextSong()) != nullptr) {
|
while ((song = e.NextSong()) != nullptr) {
|
||||||
if (playlist_check_translate_song(*song, base_uri.c_str(),
|
if (playlist_check_translate_song(*song, base_uri.c_str(),
|
||||||
loader)) {
|
loader) &&
|
||||||
if (detail)
|
detail)
|
||||||
song_print_info(client, *song);
|
song_print_info(client, *song);
|
||||||
else
|
else
|
||||||
song_print_uri(client, *song);
|
/* fallback if no detail was requested or no
|
||||||
}
|
detail was available */
|
||||||
|
song_print_uri(client, *song);
|
||||||
|
|
||||||
delete song;
|
delete song;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user