From d051d8b1592fd1cb9b46973b5b5022a5fed1f532 Mon Sep 17 00:00:00 2001 From: Kaliko Jack Date: Sun, 25 Aug 2024 16:06:55 +0200 Subject: [PATCH] Add playlistlength command (closes #17) --- CHANGES.txt | 1 + doc/source/_commands.rst | 1 + musicpd.py | 1 + 3 files changed, 3 insertions(+) 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, -- 2.39.5