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

This commit is contained in:
Max Kellermann 2020-01-18 23:29:38 +01:00
parent 4029a79dc2
commit f249a755e2
3 changed files with 7 additions and 0 deletions

1
NEWS
View File

@ -4,6 +4,7 @@ ver 0.22 (not yet released)
"window" parameters
- add command "readpicture" to download embedded pictures
- command "moveoutput" moves an output between partitions
- show partition name in "status" response
* tags
- new tags "Grouping" (for ID3 "TIT1"), "Work" and "Conductor"
* input

View File

@ -439,6 +439,8 @@ Querying :program:`MPD`'s status
Reports the current status of the player and the volume
level.
- ``partition``: the name of the current partition (see
:ref:`partition_commands`)
- ``volume``: ``0-100`` (deprecated: ``-1`` if the volume cannot
be determined)
- ``repeat``: ``0`` or ``1``
@ -1238,6 +1240,8 @@ Connection settings
Announce that this client is interested in all tag
types. This is the default setting for new clients.
.. _partition_commands:
Partition commands
==================

View File

@ -138,6 +138,7 @@ handle_status(Client &client, gcc_unused Request args, Response &r)
COMMAND_STATUS_RANDOM ": %i\n"
COMMAND_STATUS_SINGLE ": %s\n"
COMMAND_STATUS_CONSUME ": %i\n"
"partition: %s\n"
COMMAND_STATUS_PLAYLIST ": %li\n"
COMMAND_STATUS_PLAYLIST_LENGTH ": %i\n"
COMMAND_STATUS_MIXRAMPDB ": %f\n"
@ -146,6 +147,7 @@ handle_status(Client &client, gcc_unused Request args, Response &r)
playlist.GetRandom(),
SingleToString(playlist.GetSingle()),
playlist.GetConsume(),
partition.name.c_str(),
(unsigned long)playlist.GetVersion(),
playlist.GetLength(),
pc.GetMixRampDb(),