From: Kaliko Jack Date: Fri, 5 Feb 2021 10:18:57 +0000 (+0100) Subject: Add getvol command (closes #9) X-Git-Tag: v0.6.0~20 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=2dfdc858438dd13fe3d7befb04113df4b38101a5;p=python-musicpd.git Add getvol command (closes #9) --- 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,