Send OK only when no ACK in command list
This commit is contained in:
parent
8c983f2014
commit
527d345488
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user