command: add command "getvol"
Closes https://github.com/MusicPlayerDaemon/MPD/issues/979
This commit is contained in:
@@ -318,6 +318,18 @@ handle_rescan(Client &client, Request args, Response &r)
|
||||
return handle_update(client, args, r, true);
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_getvol(Client &client, Request, Response &r)
|
||||
{
|
||||
auto &partition = client.GetPartition();
|
||||
|
||||
const auto volume = volume_level_get(partition.outputs);
|
||||
if (volume >= 0)
|
||||
r.Format("volume: %i\n", volume);
|
||||
|
||||
return CommandResult::OK;
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_setvol(Client &client, Request args, Response &r)
|
||||
{
|
||||
|
Reference in New Issue
Block a user