]> kaliko git repositories - python-musicpd.git/commitdiff
Adds support for partition commands
authorNaglis Jonaitis <naglis@mailbox.org>
Sat, 22 Dec 2018 13:16:08 +0000 (15:16 +0200)
committerKaliko Jack <kaliko@azylum.org>
Tue, 29 Jan 2019 16:17:04 +0000 (17:17 +0100)
https://musicpd.org/doc/html/protocol.html#partition-commands

doc/commands.txt
musicpd.py
test.py

index 178d883cf8cb7d59457f0c777095f92a5552d14a..10134a1b361e5d6268b9058d5524aa9852cf985a 100644 (file)
@@ -102,6 +102,11 @@ kill                        -> None
 password           <str>    -> fetch_nothing
 ping                        -> fetch_nothing
 
+== Partition Commands
+partition          <str>    -> fetch_nothing
+listpartitions              -> fetch_list
+newpartition       <str>    -> fetch_nothing
+
 == Audio Output Commands
 disableoutput      <int>    -> fetch_nothing
 enableoutput       <int>    -> fetch_nothing
index 2e0f8b3194551b9562acbe45ada4457e3d39678b..192f6f342c78a7bd349d2ad17aa8653ac853d2ef 100644 (file)
@@ -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 5922041619214989740a74aa7416da2a4d0a43b5..f1976705e1f4525b8792859ef64bca7a7f7584ba 100755 (executable)
--- 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',