aboutsummaryrefslogtreecommitdiffstats
path: root/src/tag/Tag.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-09-05 18:23:15 +0200
committerMax Kellermann <max@duempel.org>2013-09-05 18:27:08 +0200
commit2b676dc5fcd7b3a472d4c14f228ea4b7969b4e9e (patch)
tree5501a0f0814abc225b1601a3ca24c6572f60def4 /src/tag/Tag.cxx
parent3f267b1795d68e660af9ec1678909a6102102d7d (diff)
downloadmpd-2b676dc5fcd7b3a472d4c14f228ea4b7969b4e9e.tar.gz
mpd-2b676dc5fcd7b3a472d4c14f228ea4b7969b4e9e.tar.xz
mpd-2b676dc5fcd7b3a472d4c14f228ea4b7969b4e9e.zip
Tag: move configuration code to TagConfig.cxx
Allow using the Tag.cxx library without the Config library.
Diffstat (limited to 'src/tag/Tag.cxx')
-rw-r--r--src/tag/Tag.cxx50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/tag/Tag.cxx b/src/tag/Tag.cxx
index c960da537..2b1967006 100644
--- a/src/tag/Tag.cxx
+++ b/src/tag/Tag.cxx
@@ -21,15 +21,9 @@
#include "Tag.hxx"
#include "TagInternal.hxx"
#include "TagPool.hxx"
-#include "ConfigGlobal.hxx"
-#include "ConfigOption.hxx"
-#include "Song.hxx"
-#include "system/FatalError.hxx"
#include <glib.h>
#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
/**
@@ -85,52 +79,8 @@ items_size(const Tag &tag)
void tag_lib_init(void)
{
- const char *value;
- int quit = 0;
- char *temp;
- char *s;
- char *c;
- enum tag_type type;
-
- /* parse the "metadata_to_use" config parameter below */
-
/* ignore comments by default */
ignore_tag_items[TAG_COMMENT] = true;
-
- value = config_get_string(CONF_METADATA_TO_USE, nullptr);
- if (value == nullptr)
- return;
-
- memset(ignore_tag_items, true, TAG_NUM_OF_ITEM_TYPES);
-
- if (0 == g_ascii_strcasecmp(value, "none"))
- return;
-
- temp = c = s = g_strdup(value);
- while (!quit) {
- if (*s == ',' || *s == '\0') {
- if (*s == '\0')
- quit = 1;
- *s = '\0';
-
- c = g_strstrip(c);
- if (*c == 0)
- continue;
-
- type = tag_name_parse_i(c);
- if (type == TAG_NUM_OF_ITEM_TYPES)
- FormatFatalError("error parsing metadata item \"%s\"",
- c);
-
- ignore_tag_items[type] = false;
-
- s++;
- c = s;
- }
- s++;
- }
-
- g_free(temp);
}
void