Commit 553d4e92 authored by Max Kellermann's avatar Max Kellermann

playlist/soundcloud: use config_dup_block_string()

parent 7cef5247
...@@ -43,16 +43,14 @@ static struct { ...@@ -43,16 +43,14 @@ static struct {
static bool static bool
soundcloud_init(const struct config_param *param) soundcloud_init(const struct config_param *param)
{ {
const char *apikey = config_get_block_string(param, "apikey", NULL); soundcloud_config.apikey =
config_dup_block_string(param, "apikey", NULL);
if (apikey == NULL) { if (soundcloud_config.apikey == NULL) {
g_debug("disabling the soundcloud playlist plugin " g_debug("disabling the soundcloud playlist plugin "
"because API key is not set"); "because API key is not set");
return false; return false;
} }
soundcloud_config.apikey = g_strdup(apikey);
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment