Commit 0cfd4fff authored by Max Kellermann's avatar Max Kellermann

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().
parent 8904127c
ver 0.19.7 (not yet released)
* playlist
- don't skip non-existent songs in "listplaylist"
ver 0.19.6 (2014/12/08)
* decoder
......
......@@ -43,12 +43,13 @@ playlist_provider_print(Client &client, const char *uri,
DetachedSong *song;
while ((song = e.NextSong()) != nullptr) {
if (playlist_check_translate_song(*song, base_uri.c_str(),
loader)) {
if (detail)
song_print_info(client, *song);
else
song_print_uri(client, *song);
}
loader) &&
detail)
song_print_info(client, *song);
else
/* fallback if no detail was requested or no
detail was available */
song_print_uri(client, *song);
delete song;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment