diff options
author | Max Kellermann <max@duempel.org> | 2009-01-18 16:56:07 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-18 16:56:07 +0100 |
commit | 1f0dfb4407344996bbe874525413275b79da12b3 (patch) | |
tree | 6da8c04bf1e3c6143927d3a69eecb3532f88939f /src/main.c | |
parent | 9933144de7389b12b2a75cfb4320baecefa952af (diff) | |
download | mpd-1f0dfb4407344996bbe874525413275b79da12b3.tar.gz mpd-1f0dfb4407344996bbe874525413275b79da12b3.tar.xz mpd-1f0dfb4407344996bbe874525413275b79da12b3.zip |
mapper: make the music_directory optional
Without a music_directory, MPD is an excellent streaming client.
Diffstat (limited to '')
-rw-r--r-- | src/main.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c index b7e9e0106..1bcae8f36 100644 --- a/src/main.c +++ b/src/main.c @@ -128,7 +128,16 @@ static void openDB(Options * options, char *argv0) { struct config_param *param; - param = parseConfigFilePath(CONF_DB_FILE, true); + param = parseConfigFilePath(CONF_DB_FILE, + mapper_has_music_directory()); + if (!mapper_has_music_directory()) { + if (param != NULL) + g_message("Found " CONF_DB_FILE " setting without " + CONF_MUSIC_DIR " - disabling database"); + db_init(NULL); + return; + } + db_init(param->value); if (options->createDB > 0 || !db_load()) { |