From: kaliko Date: Sun, 10 May 2020 14:21:35 +0000 (+0200) Subject: MPD client: Use command list to add multiple tracks X-Git-Tag: 0.16.0.dev0~21 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=a5fb4f8e56c0eab94706382e6aa64abd2dae1846;p=mpd-sima.git MPD client: Use command list to add multiple tracks --- 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)