From 0cfd4fff62be0e2fd16041347ba7dfa7b84fec11 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 9 Dec 2014 13:36:48 +0100 Subject: 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(). --- src/playlist/Print.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/playlist') diff --git a/src/playlist/Print.cxx b/src/playlist/Print.cxx index 0db2a4ab0..8f743f56d 100644 --- a/src/playlist/Print.cxx +++ b/src/playlist/Print.cxx @@ -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; } -- cgit v1.2.3