From 2dfdc858438dd13fe3d7befb04113df4b38101a5 Mon Sep 17 00:00:00 2001 From: Kaliko Jack Date: Fri, 5 Feb 2021 11:18:57 +0100 Subject: [PATCH] Add getvol command (closes #9) --- CHANGES.txt | 1 + doc/source/commands.rst | 2 +- doc/source/commands.txt | 1 + musicpd.py | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index e777f9e..e7e02c7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,7 @@ Changes in 0.6.0 UNRELEASED * Switch back to gztar (even though official python doc mention xztar, PEP 527 considers only gztar and zip) * Add binarylimit command +* Add getvol command Changes in 0.5.1 diff --git a/doc/source/commands.rst b/doc/source/commands.rst index 7f08135..0d02402 100644 --- a/doc/source/commands.rst +++ b/doc/source/commands.rst @@ -11,6 +11,6 @@ Get current available commands: print(' '.join([cmd for cmd in musicpd.MPDClient()._commands.keys()])) -List, last updated for v0.5.0: +List, last updated for v0.6.0: .. literalinclude:: commands.txt diff --git a/doc/source/commands.txt b/doc/source/commands.txt index 77c49b6..b9dc4a2 100644 --- a/doc/source/commands.txt +++ b/doc/source/commands.txt @@ -14,6 +14,7 @@ mixrampdelay -> fetch_nothing random -> fetch_nothing repeat -> fetch_nothing setvol -> fetch_nothing +getvol -> fetch_object single -> fetch_nothing replay_gain_mode -> fetch_nothing replay_gain_status -> fetch_item diff --git a/musicpd.py b/musicpd.py index df2c923..82a6085 100644 --- a/musicpd.py +++ b/musicpd.py @@ -173,6 +173,7 @@ class MPDClient: "random": self._fetch_nothing, "repeat": self._fetch_nothing, "setvol": self._fetch_nothing, + "getvol": self._fetch_object, "single": self._fetch_nothing, "replay_gain_mode": self._fetch_nothing, "replay_gain_status": self._fetch_item, -- 2.39.5