diff --git a/beetsplug/bpd/__init__.py b/beetsplug/bpd/__init__.py index 7c40cb6b6..97d89d914 100644 --- a/beetsplug/bpd/__init__.py +++ b/beetsplug/bpd/__init__.py @@ -847,6 +847,9 @@ class MPDConnection(Connection): yield self.send(err.response()) break continue + if line == u'noidle': + # When not in idle, this command sends no response. + continue if clist is not None: # Command list already opened. diff --git a/test/test_player.py b/test/test_player.py index 048f2cedd..f22c19261 100644 --- a/test/test_player.py +++ b/test/test_player.py @@ -457,6 +457,14 @@ class BPDQueryTest(BPDTestHelper): response = client.send_command('noidle') self._assert_ok(response) + def test_cmd_noidle_when_not_idle(self): + with self.run_bpd() as client: + # Manually send a command without reading a response. + request = client.serialise_command('noidle') + client.sock.sendall(request) + response = client.send_command('notacommand') + self._assert_failed(response, bpd.ERROR_UNKNOWN) + class BPDPlaybackTest(BPDTestHelper): test_implements_playback = implements({