From 527d345488ed931f16a2597f09af428bc43b064b Mon Sep 17 00:00:00 2001 From: Johannes Knutsen Date: Sun, 14 Feb 2010 01:19:21 +0100 Subject: [PATCH] Send OK only when no ACK in command list --- mopidy/mpd/handler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mopidy/mpd/handler.py b/mopidy/mpd/handler.py index ef7274f8..65c00ceb 100644 --- a/mopidy/mpd/handler.py +++ b/mopidy/mpd/handler.py @@ -66,7 +66,7 @@ class MpdHandler(object): response.append(u'%s: %s' % (key, value)) else: response.append(line) - if add_ok: + if add_ok and (not response or not response[-1].startswith(u'ACK')): response.append(u'OK') return response @@ -109,6 +109,8 @@ class MpdHandler(object): response = self.handle_request(command, add_ok=False) if response is not None: result.append(response) + if response and response[-1].startswith(u'ACK'): + return result if command_list_ok: response.append(u'list_OK') return result