summaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-07-18 10:50:09 +0200
committerMax Kellermann <max@musicpd.org>2018-07-18 10:50:09 +0200
commitfd80683ade480d6417d66d0fc882b598738002f8 (patch)
treec16065c8fb2cd2b79c5b1e8f1b01d4fdfd12dfd3 /src/config
parent49efb6071cbb42384ba8abb7a4696a375c1f8f36 (diff)
decoder/mad: make "gapless_mp3_playback" a block option
Remove another dependency on the config/Global library.
Diffstat (limited to 'src/config')
-rw-r--r--src/config/Migrate.cxx9
-rw-r--r--src/config/Templates.cxx2
2 files changed, 10 insertions, 1 deletions
diff --git a/src/config/Migrate.cxx b/src/config/Migrate.cxx
index 9c1ebf7df..fa401dd2d 100644
--- a/src/config/Migrate.cxx
+++ b/src/config/Migrate.cxx
@@ -56,8 +56,17 @@ MigrateCurlProxyConfig(ConfigData &config) noexcept
"proxy_password");
}
+static void
+MigrateMadConfig(ConfigData &config) noexcept
+{
+ MigrateParamToBlockParam(config, ConfigOption::GAPLESS_MP3_PLAYBACK,
+ ConfigBlockOption::DECODER, "plugin", "mad",
+ "gapless");
+}
+
void
Migrate(ConfigData &config) noexcept
{
MigrateCurlProxyConfig(config);
+ MigrateMadConfig(config);
}
diff --git a/src/config/Templates.cxx b/src/config/Templates.cxx
index f09321a74..3c2d78aae 100644
--- a/src/config/Templates.cxx
+++ b/src/config/Templates.cxx
@@ -68,7 +68,7 @@ const ConfigTemplate config_param_templates[] = {
{ "id3v1_encoding", false, true },
{ "metadata_to_use" },
{ "save_absolute_paths_in_playlists" },
- { "gapless_mp3_playback" },
+ { "gapless_mp3_playback", false, true },
{ "auto_update" },
{ "auto_update_depth" },
{ "despotify_user", false, true },