-# Python MPD client library
+# python-mpd: Python MPD client library
# Copyright (C) 2008-2010 J. Alexander Treuman <jat@spatialrift.net>
#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
+# python-mpd is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
-# This program is distributed in the hope that it will be useful,
+# python-mpd is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# GNU Lesser General Public License for more details.
#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU Lesser General Public License
+# along with python-mpd. If not, see <http://www.gnu.org/licenses/>.
import socket
"lsinfo": self._fetch_database,
"search": self._fetch_songs,
"update": self._fetch_item,
+ # Sticker Commands
+ "sticker get": self._fetch_item,
+ "sticker set": self._fetch_nothing,
+ "sticker delete": self._fetch_nothing,
+ "sticker list": self._fetch_list,
+ "sticker find": self._fetch_songs,
# Connection Commands
"close": None,
"kill": None,
"notcommands": self._fetch_list,
"tagtypes": self._fetch_list,
"urlhandlers": self._fetch_list,
+ "decoders": self._fetch_plugins,
}
def __getattr__(self, attr):
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"])
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())