db: add compile-time option to disable database

This commit is contained in:
Max Kellermann
2014-01-30 20:29:48 +01:00
parent 34b309b99a
commit 4465e2c46b
25 changed files with 297 additions and 57 deletions

View File

@@ -22,7 +22,6 @@
#include "CommandError.hxx"
#include "Playlist.hxx"
#include "PlaylistPrint.hxx"
#include "db/update/Service.hxx"
#include "client/Client.hxx"
#include "mixer/Volume.hxx"
#include "Partition.hxx"
@@ -32,6 +31,10 @@
#include "AudioFormat.hxx"
#include "ReplayGainConfig.hxx"
#ifdef ENABLE_DATABASE
#include "db/update/Service.hxx"
#endif
#define COMMAND_STATUS_STATE "state"
#define COMMAND_STATUS_REPEAT "repeat"
#define COMMAND_STATUS_SINGLE "single"
@@ -187,6 +190,7 @@ handle_status(Client &client,
}
}
#ifdef ENABLE_DATABASE
const UpdateService *update_service = client.partition.instance.update;
unsigned updateJobId = update_service != nullptr
? update_service->GetId()
@@ -196,6 +200,7 @@ handle_status(Client &client,
COMMAND_STATUS_UPDATING_DB ": %i\n",
updateJobId);
}
#endif
Error error = client.player_control.LockGetError();
if (error.IsDefined())