From: Kaliko Jack Date: Sun, 25 Aug 2024 14:06:55 +0000 (+0200) Subject: Add playlistlength command (closes #17) X-Git-Tag: v0.9.1^0 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=python-musicpd.git Add playlistlength command (closes #17) --- diff --git a/CHANGES.txt b/CHANGES.txt index 381d8db..65bf841 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,7 @@ python-musicpd Changes List Changes in 0.9.1 ---------------- + * Add playlistlength command * Add stickernames command * Add searchcount command * Improved documentation, add supported commands rtype diff --git a/doc/source/_commands.rst b/doc/source/_commands.rst index 432403b..b145a92 100644 --- a/doc/source/_commands.rst +++ b/doc/source/_commands.rst @@ -84,6 +84,7 @@ Protocol documentation: `Stored playlists None * **playlistclear** -> None * **playlistdelete** -> None +* **playlistlength** -> dict * **playlistmove** -> None * **rename** -> None * **rm** -> None diff --git a/musicpd.py b/musicpd.py index 5dc9a14..22d8d2b 100644 --- a/musicpd.py +++ b/musicpd.py @@ -246,6 +246,7 @@ class MPDClient: "playlistadd": self._fetch_nothing, "playlistclear": self._fetch_nothing, "playlistdelete": self._fetch_nothing, + "playlistlength": self._fetch_object, "playlistmove": self._fetch_nothing, "rename": self._fetch_nothing, "rm": self._fetch_nothing,