From: J. Alexander Treuman Date: Mon, 1 Jun 2009 16:41:30 +0000 (-0400) Subject: rearranging commands to match new protocol documentation X-Git-Tag: v0.3.0~39 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=4aca8706d2349557ea5cac23c104b5d5061c8ee1;p=python-musicpd.git rearranging commands to match new protocol documentation --- diff --git a/doc/commands.txt b/doc/commands.txt index fcf48bb..68f6ed2 100644 --- a/doc/commands.txt +++ b/doc/commands.txt @@ -1,69 +1,80 @@ -== Admin Commands -disableoutput -> getnone -enableoutput -> getnone -kill -> None -update [] -> getitem -== Informational Commands +== Status Commands +clearerror -> getnone +currentsong -> getobject status -> getobject stats -> getobject -outputs -> getoutputs -commands -> getlist -notcommands -> getlist -tagtypes -> getlist -urlhandlers -> getlist -== Database Commands -find -> getsongs -list [] -> getlist -listall [] -> getdatabase -listallinfo [] -> getdatabase -lsinfo [] -> getdatabase -search -> getsongs -count -> getobject + +== Playback Option Commands +crossfade -> getnone +random -> getnone +repeat -> getnone +setvol -> getnone +volume -> getnone + +== Playback Control Commands +next -> getnone +pause [] -> getnone +play [] -> getnone +playid [] -> getnone +previous -> getnone +seek -> getnone +seekid -> getnone +stop -> getnone + == Playlist Commands add -> getnone addid [] -> getitem clear -> getnone -currentsong -> getobject delete -> getnone deleteid -> getnone -load -> getnone -rename -> getnone move -> getnone moveid -> getnone playlist -> getplaylist -playlistinfo [] -> getsongs +playlistfind -> getsongs playlistid [] -> getsongs +playlistinfo [] -> getsongs +playlistsearch -> getsongs plchanges -> getsongs plchangesposid -> getchanges -rm -> getnone -save -> getnone shuffle -> getnone swap -> getnone swapid -> getnone + +== Stored Playlist Commands listplaylist -> getlist listplaylistinfo -> getsongs +load -> getnone playlistadd -> getnone playlistclear -> getnone playlistdelete -> getnone playlistmove -> getnone -playlistfind -> getsongs -playlistsearch -> getsongs -== Playback Commands -crossfade -> getnone -next -> getnone -pause [] -> getnone -play [] -> getnone -playid [] -> getnone -previous -> getnone -random -> getnone -repeat -> getnone -seek -> getnone -seekid -> getnone -setvol -> getnone -stop -> getnone -volume -> getnone -== Miscellaneous Commands -clearerror -> getnone +rename -> getnone +rm -> getnone +save -> getnone + +== Database Commands +count -> getobject +find -> getsongs +list [] -> getlist +listall [] -> getdatabase +listallinfo [] -> getdatabase +lsinfo [] -> getdatabase +search -> getsongs +update [] -> getitem + +== Connection Commands close -> None +kill -> None password -> getnone ping -> getnone + +== Audio Output Commands +disableoutput -> getnone +enableoutput -> getnone +outputs -> getoutputs + +== Reflection Commands +commands -> getlist +notcommands -> getlist +tagtypes -> getlist +urlhandlers -> getlist diff --git a/mpd.py b/mpd.py index 384f856..d7aaf5d 100644 --- a/mpd.py +++ b/mpd.py @@ -51,75 +51,78 @@ class MPDClient(object): self.iterate = False self._reset() self._commands = { - # Admin Commands - "disableoutput": self._getnone, - "enableoutput": self._getnone, - "kill": None, - "update": self._getitem, - # Informational Commands + # Status Commands + "clearerror": self._getnone, + "currentsong": self._getobject, "status": self._getobject, "stats": self._getobject, - "outputs": self._getoutputs, - "commands": self._getlist, - "notcommands": self._getlist, - "tagtypes": self._getlist, - "urlhandlers": self._getlist, - # Database Commands - "find": self._getsongs, - "list": self._getlist, - "listall": self._getdatabase, - "listallinfo": self._getdatabase, - "lsinfo": self._getdatabase, - "search": self._getsongs, - "count": self._getobject, + # Playback Option Commands + "crossfade": self._getnone, + "random": self._getnone, + "repeat": self._getnone, + "setvol": self._getnone, + "volume": self._getnone, + # Playback Control Commands + "next": self._getnone, + "pause": self._getnone, + "play": self._getnone, + "playid": self._getnone, + "previous": self._getnone, + "seek": self._getnone, + "seekid": self._getnone, + "stop": self._getnone, # Playlist Commands "add": self._getnone, "addid": self._getitem, "clear": self._getnone, - "currentsong": self._getobject, "delete": self._getnone, "deleteid": self._getnone, - "load": self._getnone, - "rename": self._getnone, "move": self._getnone, "moveid": self._getnone, "playlist": self._getplaylist, - "playlistinfo": self._getsongs, + "playlistfind": self._getsongs, "playlistid": self._getsongs, + "playlistinfo": self._getsongs, + "playlistsearch": self._getsongs, "plchanges": self._getsongs, "plchangesposid": self._getchanges, - "rm": self._getnone, - "save": self._getnone, "shuffle": self._getnone, "swap": self._getnone, "swapid": self._getnone, + # Stored Playlist Commands "listplaylist": self._getlist, "listplaylistinfo": self._getsongs, + "load": self._getnone, "playlistadd": self._getnone, "playlistclear": self._getnone, "playlistdelete": self._getnone, "playlistmove": self._getnone, - "playlistfind": self._getsongs, - "playlistsearch": self._getsongs, - # Playback Commands - "crossfade": self._getnone, - "next": self._getnone, - "pause": self._getnone, - "play": self._getnone, - "playid": self._getnone, - "previous": self._getnone, - "random": self._getnone, - "repeat": self._getnone, - "seek": self._getnone, - "seekid": self._getnone, - "setvol": self._getnone, - "stop": self._getnone, - "volume": self._getnone, - # Miscellaneous Commands - "clearerror": self._getnone, + "rename": self._getnone, + "rm": self._getnone, + "save": self._getnone, + # Database Commands + "count": self._getobject, + "find": self._getsongs, + "list": self._getlist, + "listall": self._getdatabase, + "listallinfo": self._getdatabase, + "lsinfo": self._getdatabase, + "search": self._getsongs, + "update": self._getitem, + # Connection Commands "close": None, + "kill": None, "password": self._getnone, "ping": self._getnone, + # Audio Output Commands + "disableoutput": self._getnone, + "enableoutput": self._getnone, + "outputs": self._getoutputs, + # Reflection Commands + "commands": self._getlist, + "notcommands": self._getlist, + "tagtypes": self._getlist, + "urlhandlers": self._getlist, } def __getattr__(self, attr):