diff options
author | Max Kellermann <max@musicpd.org> | 2020-01-18 23:30:45 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2020-01-18 23:30:45 +0100 |
commit | 4029a79dc200061c61222b3cb8919ffb1264faa5 (patch) | |
tree | 8ff647b6ee5b18b6d2bf866b4154551add05d70f /src/command | |
parent | c16233fa7423ff6a0455b572b154837fd17cf566 (diff) |
command/player: add local Partition reference variable
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/PlayerCommands.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/command/PlayerCommands.cxx b/src/command/PlayerCommands.cxx index 193621648..ff6dcfd75 100644 --- a/src/command/PlayerCommands.cxx +++ b/src/command/PlayerCommands.cxx @@ -108,7 +108,8 @@ handle_pause(Client &client, Request args, gcc_unused Response &r) CommandResult handle_status(Client &client, gcc_unused Request args, Response &r) { - auto &pc = client.GetPlayerControl(); + auto &partition = client.GetPartition(); + auto &pc = partition.pc; const char *state = nullptr; int song; @@ -127,9 +128,9 @@ handle_status(Client &client, gcc_unused Request args, Response &r) break; } - const playlist &playlist = client.GetPlaylist(); + const auto &playlist = partition.playlist; - const auto volume = volume_level_get(client.GetPartition().outputs); + const auto volume = volume_level_get(partition.outputs); if (volume >= 0) r.Format("volume: %i\n", volume); @@ -186,7 +187,7 @@ handle_status(Client &client, gcc_unused Request args, Response &r) } #ifdef ENABLE_DATABASE - const UpdateService *update_service = client.GetInstance().update; + const UpdateService *update_service = partition.instance.update; unsigned updateJobId = update_service != nullptr ? update_service->GetId() : 0; |