From: J. Alexander Treuman Date: Mon, 1 Jun 2009 21:53:40 +0000 (-0400) Subject: adding listplaylists command X-Git-Tag: v0.3.0~38 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=c465a35a2b587e14f3f86be3d983d5b074ed375d;p=python-musicpd.git adding listplaylists command --- diff --git a/doc/commands.txt b/doc/commands.txt index 68f6ed2..df8058a 100644 --- a/doc/commands.txt +++ b/doc/commands.txt @@ -43,6 +43,7 @@ swapid -> getnone == Stored Playlist Commands listplaylist -> getlist listplaylistinfo -> getsongs +listplaylists -> getplaylists load -> getnone playlistadd -> getnone playlistclear -> getnone diff --git a/mpd.py b/mpd.py index d7aaf5d..3a5d867 100644 --- a/mpd.py +++ b/mpd.py @@ -92,6 +92,7 @@ class MPDClient(object): # Stored Playlist Commands "listplaylist": self._getlist, "listplaylistinfo": self._getsongs, + "listplaylists": self._getplaylists, "load": self._getnone, "playlistadd": self._getnone, "playlistclear": self._getnone, @@ -262,6 +263,9 @@ class MPDClient(object): def _getsongs(self): return self._getobjects(["file"]) + def _getplaylists(self): + return self._getobjects(["playlist"]) + def _getdatabase(self): return self._getobjects(["file", "directory", "playlist"])