From 9aef30b0bc6eae8053969a6772d0dacadf0f6bab Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Sun, 22 Aug 2010 23:55:14 +0200 Subject: Implemented tag_get(). --- tag.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tag.c') diff --git a/tag.c b/tag.c index ca56106..5ee16b7 100644 --- a/tag.c +++ b/tag.c @@ -70,3 +70,14 @@ struct tag *tag_read(const gchar *path) { return tag; } + +const gchar *tag_get(struct tag *tag, enum tag_type type) { + for(GSList *node = tag->fields; node; node = g_slist_next(node)) { + struct tag_field *field = node->data; + if(field->type == type) { + return field->string; + } + } + + return NULL; +} -- cgit v1.2.3