From a5fb4f8e56c0eab94706382e6aa64abd2dae1846 Mon Sep 17 00:00:00 2001 From: kaliko Date: Sun, 10 May 2020 16:21:35 +0200 Subject: [PATCH] MPD client: Use command list to add multiple tracks --- sima/mpdclient.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sima/mpdclient.py b/sima/mpdclient.py index 13aa0b0..afc51dc 100644 --- a/sima/mpdclient.py +++ b/sima/mpdclient.py @@ -249,8 +249,10 @@ class MPD(MPDClient): if isinstance(payload, Track): super().__getattr__('add')(payload.file) elif isinstance(payload, list): + self.command_list_ok_begin() for tr in payload: # TODO: use send command here self.add(tr) + results = client.command_list_end() else: self.log.error('Cannot add %s', payload) -- 2.39.5