]> kaliko git repositories - python-musicpd.git/commitdiff
adding decoders command
authorJ. Alexander Treuman <jat@spatialrift.net>
Mon, 13 Dec 2010 22:47:49 +0000 (17:47 -0500)
committerJ. Alexander Treuman <jat@spatialrift.net>
Mon, 13 Dec 2010 22:47:49 +0000 (17:47 -0500)
doc/commands.txt
mpd.py

index 826e48288cbba7fb7f7ef9ac4a453d9842926d61..8fb069d9af432d1826e352b857c2cf1ebf682648 100644 (file)
@@ -90,3 +90,4 @@ commands                                 -> fetch_list
 notcommands                              -> fetch_list
 tagtypes                                 -> fetch_list
 urlhandlers                              -> fetch_list
+decoders                                 -> fetch_plugins
diff --git a/mpd.py b/mpd.py
index e4279398293c24a82f02de672545a07a28452187..f18356bc8934c4f491467e1bfaec5271aaf905c0 100644 (file)
--- a/mpd.py
+++ b/mpd.py
@@ -140,6 +140,7 @@ class MPDClient(object):
             "notcommands":      self._fetch_list,
             "tagtypes":         self._fetch_list,
             "urlhandlers":      self._fetch_list,
+            "decoders":         self._fetch_plugins,
         }
 
     def __getattr__(self, attr):
@@ -323,6 +324,9 @@ class MPDClient(object):
     def _fetch_objects(self, delimiters):
         return self._wrap_iterator(self._read_objects(delimiters))
 
+    def _fetch_changes(self):
+        return self._fetch_objects(["cpos"])
+
     def _fetch_songs(self):
         return self._fetch_objects(["file"])
 
@@ -335,8 +339,8 @@ class MPDClient(object):
     def _fetch_outputs(self):
         return self._fetch_objects(["outputid"])
 
-    def _fetch_changes(self):
-        return self._fetch_objects(["cpos"])
+    def _fetch_plugins(self):
+        return self._fetch_objects(["plugin"])
 
     def _fetch_command_list(self):
         return self._wrap_iterator(self._read_command_list())