playlist/Registry: use struct ConfigData
This commit is contained in:
parent
ea5096ac90
commit
61a119b607
|
@ -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();
|
||||
|
|
|
@ -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 <assert.h>
|
||||
|
@ -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))
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue