diff --git a/src/Main.cxx b/src/Main.cxx index 062009adc..caad35cc6 100644 --- a/src/Main.cxx +++ b/src/Main.cxx @@ -572,7 +572,7 @@ try { client_manager_init(); input_stream_global_init(GetGlobalConfig(), instance->io_thread.GetEventLoop()); - playlist_list_global_init(); + playlist_list_global_init(GetGlobalConfig()); #ifdef ENABLE_DAEMON daemonize_commit(); diff --git a/src/playlist/PlaylistRegistry.cxx b/src/playlist/PlaylistRegistry.cxx index 8736546b2..62f5e03b8 100644 --- a/src/playlist/PlaylistRegistry.cxx +++ b/src/playlist/PlaylistRegistry.cxx @@ -36,7 +36,7 @@ #include "util/UriUtil.hxx" #include "util/StringUtil.hxx" #include "util/Macros.hxx" -#include "config/Global.hxx" +#include "config/Data.hxx" #include "config/Block.hxx" #include @@ -75,15 +75,15 @@ static bool playlist_plugins_enabled[n_playlist_plugins]; if (playlist_plugins_enabled[playlist_plugin_iterator - playlist_plugins]) void -playlist_list_global_init(void) +playlist_list_global_init(const ConfigData &config) { const ConfigBlock empty; for (unsigned i = 0; playlist_plugins[i] != nullptr; ++i) { const struct playlist_plugin *plugin = playlist_plugins[i]; const auto *param = - config_find_block(ConfigBlockOption::PLAYLIST_PLUGIN, - "name", plugin->name); + config.FindBlock(ConfigBlockOption::PLAYLIST_PLUGIN, + "name", plugin->name); if (param == nullptr) param = ∅ else if (!param->GetBlockValue("enabled", true)) diff --git a/src/playlist/PlaylistRegistry.hxx b/src/playlist/PlaylistRegistry.hxx index a651818f6..9f56dddf1 100644 --- a/src/playlist/PlaylistRegistry.hxx +++ b/src/playlist/PlaylistRegistry.hxx @@ -23,6 +23,7 @@ #include "input/Ptr.hxx" #include "Compiler.h" +struct ConfigData; class Mutex; class SongEnumerator; @@ -38,7 +39,7 @@ extern const struct playlist_plugin *const playlist_plugins[]; * Initializes all playlist plugins. */ void -playlist_list_global_init(); +playlist_list_global_init(const ConfigData &config); /** * Deinitializes all playlist plugins. diff --git a/test/dump_playlist.cxx b/test/dump_playlist.cxx index 6ddced166..30c862872 100644 --- a/test/dump_playlist.cxx +++ b/test/dump_playlist.cxx @@ -68,7 +68,7 @@ try { io_thread.Start(); input_stream_global_init(GetGlobalConfig(), io_thread.GetEventLoop()); - playlist_list_global_init(); + playlist_list_global_init(GetGlobalConfig()); decoder_plugin_init_all(GetGlobalConfig()); /* open the playlist */