From: Naglis Jonaitis Date: Sat, 22 Dec 2018 13:16:08 +0000 (+0200) Subject: Adds support for partition commands X-Git-Tag: v0.4.4~10 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=31b25f597c7e572317fbf27ededeed70dfd974b9;p=python-musicpd.git Adds support for partition commands https://musicpd.org/doc/html/protocol.html#partition-commands --- diff --git a/doc/commands.txt b/doc/commands.txt index 178d883..10134a1 100644 --- a/doc/commands.txt +++ b/doc/commands.txt @@ -102,6 +102,11 @@ kill -> None password -> fetch_nothing ping -> fetch_nothing +== Partition Commands +partition -> fetch_nothing +listpartitions -> fetch_list +newpartition -> fetch_nothing + == Audio Output Commands disableoutput -> fetch_nothing enableoutput -> fetch_nothing diff --git a/musicpd.py b/musicpd.py index 2e0f8b3..192f6f3 100644 --- a/musicpd.py +++ b/musicpd.py @@ -220,6 +220,10 @@ class MPDClient: "kill": None, "password": self._fetch_nothing, "ping": self._fetch_nothing, + # Partition Commands + "partition": self._fetch_nothing, + "listpartitions": self._fetch_list, + "newpartition": self._fetch_nothing, # Audio Output Commands "disableoutput": self._fetch_nothing, "enableoutput": self._fetch_nothing, diff --git a/test.py b/test.py index 5922041..f197670 100755 --- a/test.py +++ b/test.py @@ -168,6 +168,10 @@ class TestMPDClient(unittest.TestCase): 'kill': None, 'password': 'nothing', 'ping': 'nothing', + # Partition Commands + 'partition': 'nothing', + 'listpartitions': 'list', + 'newpartition': 'nothing', # Audio Output Commands 'disableoutput': 'nothing', 'enableoutput': 'nothing',