aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlaylistPrint.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-30 20:29:48 +0100
committerMax Kellermann <max@duempel.org>2014-01-30 20:39:40 +0100
commit4465e2c46bbed438377dc4a99df333bd5c058d5e (patch)
treecbc1d27aad939689f44b0ac3542a6ca1777b9dc1 /src/PlaylistPrint.cxx
parent34b309b99aa2f274308f19974c428e1c7ac5d66f (diff)
downloadmpd-4465e2c46bbed438377dc4a99df333bd5c058d5e.tar.gz
mpd-4465e2c46bbed438377dc4a99df333bd5c058d5e.tar.xz
mpd-4465e2c46bbed438377dc4a99df333bd5c058d5e.zip
db: add compile-time option to disable database
Diffstat (limited to 'src/PlaylistPrint.cxx')
-rw-r--r--src/PlaylistPrint.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/PlaylistPrint.cxx b/src/PlaylistPrint.cxx
index faf373be7..377da25c9 100644
--- a/src/PlaylistPrint.cxx
+++ b/src/PlaylistPrint.cxx
@@ -110,6 +110,8 @@ playlist_print_changes_position(Client &client,
queue_print_changes_position(client, playlist.queue, version);
}
+#ifdef ENABLE_DATABASE
+
static bool
PrintSongDetails(Client &client, const char *uri_utf8)
{
@@ -126,16 +128,24 @@ PrintSongDetails(Client &client, const char *uri_utf8)
return true;
}
+#endif
+
bool
spl_print(Client &client, const char *name_utf8, bool detail,
Error &error)
{
+#ifndef ENABLE_DATABASE
+ (void)detail;
+#endif
+
PlaylistFileContents contents = LoadPlaylistFile(name_utf8, error);
if (contents.empty() && error.IsDefined())
return false;
for (const auto &uri_utf8 : contents) {
+#ifdef ENABLE_DATABASE
if (!detail || !PrintSongDetails(client, uri_utf8.c_str()))
+#endif
client_printf(client, SONG_FILE "%s\n",
uri_utf8.c_str());
}