Commit f249a755 authored by Max Kellermann's avatar Max Kellermann

command/player: show partition name in "status" response

parent 4029a79d
...@@ -4,6 +4,7 @@ ver 0.22 (not yet released) ...@@ -4,6 +4,7 @@ ver 0.22 (not yet released)
"window" parameters "window" parameters
- add command "readpicture" to download embedded pictures - add command "readpicture" to download embedded pictures
- command "moveoutput" moves an output between partitions - command "moveoutput" moves an output between partitions
- show partition name in "status" response
* tags * tags
- new tags "Grouping" (for ID3 "TIT1"), "Work" and "Conductor" - new tags "Grouping" (for ID3 "TIT1"), "Work" and "Conductor"
* input * input
......
...@@ -439,6 +439,8 @@ Querying :program:`MPD`'s status ...@@ -439,6 +439,8 @@ Querying :program:`MPD`'s status
Reports the current status of the player and the volume Reports the current status of the player and the volume
level. level.
- ``partition``: the name of the current partition (see
:ref:`partition_commands`)
- ``volume``: ``0-100`` (deprecated: ``-1`` if the volume cannot - ``volume``: ``0-100`` (deprecated: ``-1`` if the volume cannot
be determined) be determined)
- ``repeat``: ``0`` or ``1`` - ``repeat``: ``0`` or ``1``
...@@ -1238,6 +1240,8 @@ Connection settings ...@@ -1238,6 +1240,8 @@ Connection settings
Announce that this client is interested in all tag Announce that this client is interested in all tag
types. This is the default setting for new clients. types. This is the default setting for new clients.
.. _partition_commands:
Partition commands Partition commands
================== ==================
......
...@@ -138,6 +138,7 @@ handle_status(Client &client, gcc_unused Request args, Response &r) ...@@ -138,6 +138,7 @@ handle_status(Client &client, gcc_unused Request args, Response &r)
COMMAND_STATUS_RANDOM ": %i\n" COMMAND_STATUS_RANDOM ": %i\n"
COMMAND_STATUS_SINGLE ": %s\n" COMMAND_STATUS_SINGLE ": %s\n"
COMMAND_STATUS_CONSUME ": %i\n" COMMAND_STATUS_CONSUME ": %i\n"
"partition: %s\n"
COMMAND_STATUS_PLAYLIST ": %li\n" COMMAND_STATUS_PLAYLIST ": %li\n"
COMMAND_STATUS_PLAYLIST_LENGTH ": %i\n" COMMAND_STATUS_PLAYLIST_LENGTH ": %i\n"
COMMAND_STATUS_MIXRAMPDB ": %f\n" COMMAND_STATUS_MIXRAMPDB ": %f\n"
...@@ -146,6 +147,7 @@ handle_status(Client &client, gcc_unused Request args, Response &r) ...@@ -146,6 +147,7 @@ handle_status(Client &client, gcc_unused Request args, Response &r)
playlist.GetRandom(), playlist.GetRandom(),
SingleToString(playlist.GetSingle()), SingleToString(playlist.GetSingle()),
playlist.GetConsume(), playlist.GetConsume(),
partition.name.c_str(),
(unsigned long)playlist.GetVersion(), (unsigned long)playlist.GetVersion(),
playlist.GetLength(), playlist.GetLength(),
pc.GetMixRampDb(), pc.GetMixRampDb(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment