Support for bulk mpd add

This commit is contained in:
Fabio Manganiello 2018-09-25 09:42:46 +02:00
parent f79de2e708
commit 38f61298f8

View file

@ -208,6 +208,15 @@ class MusicMpdPlugin(MusicPlugin):
:type resource: str :type resource: str
""" """
if isinstance(resource, list):
for r in resource:
try:
self._exec('add', r)
except Exception as e:
self.logger.warning('Could not add {}: {}'.format(r, e))
return self.status().output
return self._exec('add', resource) return self._exec('add', resource)
@action @action