From c465a35a2b587e14f3f86be3d983d5b074ed375d Mon Sep 17 00:00:00 2001 From: "J. Alexander Treuman" Date: Mon, 1 Jun 2009 17:53:40 -0400 Subject: [PATCH] adding listplaylists command --- doc/commands.txt | 1 + mpd.py | 4 ++++ 2 files changed, 5 insertions(+) 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"]) -- 2.39.5