Package: ncmpc
Version: 0.43-1
Tags: patch
Severity: important
Control: forwarded -1 https://github.com/MusicPlayerDaemon/ncmpc/issues/93

After upgrading to 0.43-1 on debian testing/unstable, ncmpc no longer
offers a useful connection to my mpd server, instead showing Unknown tag
type in red.

This makes ncmpc completely unusable for me, as I cannot reach the
playlist, the file browser, or even adjust the volume.

the server in question is running mpd version 0.21.5-3 (from debian stable)

Other mpd clients (like mpc version 0.33-1, and an Android mpd client)
continue to work fine with the same server.

Upstream offered the attached patch, which I've tested locally; it
resolves the problem for me.  It (or an even better fix) will probably
be part of 0.45 whenever upstream gets around to releasing that version.

Regards,

        --dkg

From: Max Kellermann <m...@musicpd.org>
Date: Thu, 11 Feb 2021 21:44:15 +0100
Subject: mpdclient: make "tagtypes" errors non-fatal

This makes ncmpc usable even if applying the tag mask fails (for
whatever reason).

This fixes https://github.com/MusicPlayerDaemon/ncmpc/issues/93 (but a
better fix will follow).

(cherry picked from commit 7ce348cd21862e1f6b8228acbbff1a7df4df90d7)
---
 src/mpdclient.cxx | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/mpdclient.cxx b/src/mpdclient.cxx
index cc04743..b6e6ba2 100644
--- a/src/mpdclient.cxx
+++ b/src/mpdclient.cxx
@@ -331,9 +331,12 @@ mpdclient::OnConnected(struct mpd_connection *_connection) noexcept
 	    mpd_connection_cmp_server_version(connection, 0, 21, 0) >= 0 &&
 	    !SendTagWhitelist(connection, tag_whitelist)) {
 		InvokeErrorCallback();
-		Disconnect();
-		mpdclient_failed_callback();
-		return false;
+
+		if (!mpd_connection_clear_error(connection)) {
+			Disconnect();
+			mpdclient_failed_callback();
+			return false;
+		}
 	}
 #endif
 

Attachment: signature.asc
Description: PGP signature

Reply via email to