From c6725884bc155da431889468c86c546f0f64f9a1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 29 Jan 2014 20:16:43 +0100 Subject: db/update: convert to OO API Move global variables into the new classes. That may allow multiple update threads for multiple databases one day. --- src/command/PlayerCommands.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/command/PlayerCommands.cxx') diff --git a/src/command/PlayerCommands.cxx b/src/command/PlayerCommands.cxx index 5dc55b485..d51dbdc3d 100644 --- a/src/command/PlayerCommands.cxx +++ b/src/command/PlayerCommands.cxx @@ -22,10 +22,11 @@ #include "CommandError.hxx" #include "Playlist.hxx" #include "PlaylistPrint.hxx" -#include "db/update/UpdateGlue.hxx" +#include "db/update/Service.hxx" #include "client/Client.hxx" #include "mixer/Volume.hxx" #include "Partition.hxx" +#include "Instance.hxx" #include "protocol/Result.hxx" #include "protocol/ArgParser.hxx" #include "AudioFormat.hxx" @@ -111,7 +112,6 @@ handle_status(Client &client, gcc_unused int argc, gcc_unused char *argv[]) { const char *state = nullptr; - int updateJobId; int song; const auto player_status = client.player_control.GetStatus(); @@ -187,7 +187,11 @@ handle_status(Client &client, } } - if ((updateJobId = isUpdatingDB())) { + const UpdateService *update_service = client.partition.instance.update; + unsigned updateJobId = update_service != nullptr + ? update_service->GetId() + : 0; + if (updateJobId != 0) { client_printf(client, COMMAND_STATUS_UPDATING_DB ": %i\n", updateJobId); -- cgit v1.2.3