diff --git a/NEWS b/NEWS index e2fab2390..0ddd59453 100644 --- a/NEWS +++ b/NEWS @@ -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 diff --git a/doc/protocol.rst b/doc/protocol.rst index 36622b574..ddecab279 100644 --- a/doc/protocol.rst +++ b/doc/protocol.rst @@ -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 ================== diff --git a/src/command/PlayerCommands.cxx b/src/command/PlayerCommands.cxx index ff6dcfd75..9519045ea 100644 --- a/src/command/PlayerCommands.cxx +++ b/src/command/PlayerCommands.cxx @@ -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(),