From 31b25f597c7e572317fbf27ededeed70dfd974b9 Mon Sep 17 00:00:00 2001 From: Naglis Jonaitis Date: Sat, 22 Dec 2018 15:16:08 +0200 Subject: [PATCH] Adds support for partition commands https://musicpd.org/doc/html/protocol.html#partition-commands --- doc/commands.txt | 5 +++++ musicpd.py | 4 ++++ test.py | 4 ++++ 3 files changed, 13 insertions(+) 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', -- 2.39.2