aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlaylistFile.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/PlaylistFile.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/PlaylistFile.cxx')
-rw-r--r--src/PlaylistFile.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/PlaylistFile.cxx b/src/PlaylistFile.cxx
index 71dbcba9c..86100fcde 100644
--- a/src/PlaylistFile.cxx
+++ b/src/PlaylistFile.cxx
@@ -243,6 +243,7 @@ LoadPlaylistFile(const char *utf8path, Error &error)
std::string uri_utf8;
if (!uri_has_scheme(s)) {
+#ifdef ENABLE_DATABASE
uri_utf8 = map_fs_to_utf8(s);
if (uri_utf8.empty()) {
if (PathTraitsFS::IsAbsolute(s)) {
@@ -254,6 +255,9 @@ LoadPlaylistFile(const char *utf8path, Error &error)
} else
continue;
}
+#else
+ continue;
+#endif
} else {
uri_utf8 = PathToUTF8(s);
if (uri_utf8.empty())
@@ -404,6 +408,7 @@ spl_append_uri(const char *url, const char *utf8file, Error &error)
return spl_append_song(utf8file, DetachedSong(url),
error);
} else {
+#ifdef ENABLE_DATABASE
DetachedSong *song = DatabaseDetachSong(url, error);
if (song == nullptr)
return false;
@@ -411,6 +416,9 @@ spl_append_uri(const char *url, const char *utf8file, Error &error)
bool success = spl_append_song(utf8file, *song, error);
delete song;
return success;
+#else
+ return false;
+#endif
}
}