diff options
author | Max Kellermann <max@duempel.org> | 2012-02-12 18:25:10 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-02-12 18:40:55 +0100 |
commit | 686d8bbe6956b53000228c3754a278e7805467fc (patch) | |
tree | 29a42ec001d34f1feabb12757caefc4fcf64d4a6 /src/tag_handler.c | |
parent | 4b36af4a349fb8840b0bb3a9fb30552abbac663f (diff) |
tag_handler: add new handler that updates has_playlist
Diffstat (limited to 'src/tag_handler.c')
-rw-r--r-- | src/tag_handler.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tag_handler.c b/src/tag_handler.c index 32de7650..316715e8 100644 --- a/src/tag_handler.c +++ b/src/tag_handler.c @@ -20,6 +20,8 @@ #include "config.h" #include "tag_handler.h" +#include <glib.h> + static void add_tag_duration(unsigned seconds, void *ctx) { @@ -41,3 +43,18 @@ const struct tag_handler add_tag_handler = { .tag = add_tag_tag, }; +static void +full_tag_pair(const char *name, G_GNUC_UNUSED const char *value, void *ctx) +{ + struct tag *tag = ctx; + + if (g_ascii_strcasecmp(name, "cuesheet") == 0) + tag->has_playlist = true; +} + +const struct tag_handler full_tag_handler = { + .duration = add_tag_duration, + .tag = add_tag_tag, + .pair = full_tag_pair, +}; + |