From b38fd7af26788bb6c81235733209bbeb0391abc8 Mon Sep 17 00:00:00 2001 From: "J. Alexander Treuman" Date: Mon, 29 Nov 2010 14:11:19 -0500 Subject: [PATCH] adding sticker commands --- doc/commands.txt | 143 +++++++++++++++++++++++++---------------------- mpd.py | 6 ++ 2 files changed, 81 insertions(+), 68 deletions(-) diff --git a/doc/commands.txt b/doc/commands.txt index 6762d52..46a85ba 100644 --- a/doc/commands.txt +++ b/doc/commands.txt @@ -1,85 +1,92 @@ == Status Commands -clearerror -> fetch_nothing -currentsong -> fetch_object -idle -> fetch_list -noidle -> None -status -> fetch_object -stats -> fetch_object +clearerror -> fetch_nothing +currentsong -> fetch_object +idle -> fetch_list +noidle -> None +status -> fetch_object +stats -> fetch_object == Playback Option Commands -consume -> fetch_nothing -crossfade -> fetch_nothing -random -> fetch_nothing -repeat -> fetch_nothing -setvol -> fetch_nothing -single -> fetch_nothing -volume -> fetch_nothing +consume -> fetch_nothing +crossfade -> fetch_nothing +random -> fetch_nothing +repeat -> fetch_nothing +setvol -> fetch_nothing +single -> fetch_nothing +volume -> fetch_nothing == Playback Control Commands -next -> fetch_nothing -pause [] -> fetch_nothing -play [] -> fetch_nothing -playid [] -> fetch_nothing -previous -> fetch_nothing -seek -> fetch_nothing -seekid -> fetch_nothing -stop -> fetch_nothing +next -> fetch_nothing +pause [] -> fetch_nothing +play [] -> fetch_nothing +playid [] -> fetch_nothing +previous -> fetch_nothing +seek -> fetch_nothing +seekid -> fetch_nothing +stop -> fetch_nothing == Playlist Commands -add -> fetch_nothing -addid [] -> fetch_item -clear -> fetch_nothing -delete -> fetch_nothing -deleteid -> fetch_nothing -move -> fetch_nothing -moveid -> fetch_nothing -playlist -> fetch_playlist -playlistfind -> fetch_songs -playlistid [] -> fetch_songs -playlistinfo [] -> fetch_songs -playlistsearch -> fetch_songs -plchanges -> fetch_songs -plchangesposid -> fetch_changes -shuffle -> fetch_nothing -swap -> fetch_nothing -swapid -> fetch_nothing +add -> fetch_nothing +addid [] -> fetch_item +clear -> fetch_nothing +delete -> fetch_nothing +deleteid -> fetch_nothing +move -> fetch_nothing +moveid -> fetch_nothing +playlist -> fetch_playlist +playlistfind -> fetch_songs +playlistid [] -> fetch_songs +playlistinfo [] -> fetch_songs +playlistsearch -> fetch_songs +plchanges -> fetch_songs +plchangesposid -> fetch_changes +shuffle -> fetch_nothing +swap -> fetch_nothing +swapid -> fetch_nothing == Stored Playlist Commands -listplaylist -> fetch_list -listplaylistinfo -> fetch_songs -listplaylists -> fetch_playlists -load -> fetch_nothing -playlistadd -> fetch_nothing -playlistclear -> fetch_nothing -playlistdelete -> fetch_nothing -playlistmove -> fetch_nothing -rename -> fetch_nothing -rm -> fetch_nothing -save -> fetch_nothing +listplaylist -> fetch_list +listplaylistinfo -> fetch_songs +listplaylists -> fetch_playlists +load -> fetch_nothing +playlistadd -> fetch_nothing +playlistclear -> fetch_nothing +playlistdelete -> fetch_nothing +playlistmove -> fetch_nothing +rename -> fetch_nothing +rm -> fetch_nothing +save -> fetch_nothing == Database Commands -count -> fetch_object -find -> fetch_songs -list [] -> fetch_list -listall [] -> fetch_database -listallinfo [] -> fetch_database -lsinfo [] -> fetch_database -search -> fetch_songs -update [] -> fetch_item +count -> fetch_object +find -> fetch_songs +list [] -> fetch_list +listall [] -> fetch_database +listallinfo [] -> fetch_database +lsinfo [] -> fetch_database +search -> fetch_songs +update [] -> fetch_item + +== Sticker Commands +sticker get -> fetch_item +sticker set -> fetch_nothing +sticker delete [] -> fetch_nothing +sticker list -> fetch_list +sticker find -> fetch_songs == Connection Commands -close -> None -kill -> None -password -> fetch_nothing -ping -> fetch_nothing +close -> None +kill -> None +password -> fetch_nothing +ping -> fetch_nothing == Audio Output Commands -disableoutput -> fetch_nothing -enableoutput -> fetch_nothing -outputs -> fetch_outputs +disableoutput -> fetch_nothing +enableoutput -> fetch_nothing +outputs -> fetch_outputs == Reflection Commands -commands -> fetch_list -notcommands -> fetch_list -tagtypes -> fetch_list -urlhandlers -> fetch_list +commands -> fetch_list +notcommands -> fetch_list +tagtypes -> fetch_list +urlhandlers -> fetch_list diff --git a/mpd.py b/mpd.py index 56112a9..7f61075 100644 --- a/mpd.py +++ b/mpd.py @@ -120,6 +120,12 @@ class MPDClient(object): "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, -- 2.39.2