From 8904127c10d8adfe9b76f1fb74d89c17ec67fa1a Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Tue, 9 Dec 2014 13:09:03 +0100
Subject: [PATCH 1/2] configure.ac: prepare for 0.19.7

---
 NEWS         | 2 ++
 configure.ac | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index ee317f3cc..a18d63faf 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+ver 0.19.7 (not yet released)
+
 ver 0.19.6 (2014/12/08)
 * decoder
   - ffmpeg: support FFmpeg 2.5
diff --git a/configure.ac b/configure.ac
index 7ec0dbf9a..66a942288 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,10 +1,10 @@
 AC_PREREQ(2.60)
 
-AC_INIT(mpd, 0.19.6, musicpd-dev-team@lists.sourceforge.net)
+AC_INIT(mpd, 0.19.7, musicpd-dev-team@lists.sourceforge.net)
 
 VERSION_MAJOR=0
 VERSION_MINOR=19
-VERSION_REVISION=6
+VERSION_REVISION=7
 VERSION_EXTRA=0
 
 AC_CONFIG_SRCDIR([src/Main.cxx])

From 0cfd4fff62be0e2fd16041347ba7dfa7b84fec11 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Tue, 9 Dec 2014 13:36:48 +0100
Subject: [PATCH 2/2] 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().
---
 NEWS                   |  2 ++
 src/playlist/Print.cxx | 13 +++++++------
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/NEWS b/NEWS
index a18d63faf..165985925 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,6 @@
 ver 0.19.7 (not yet released)
+* playlist
+  - don't skip non-existent songs in "listplaylist"
 
 ver 0.19.6 (2014/12/08)
 * decoder
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;
 	}