summaryrefslogtreecommitdiff
path: root/tag.c
diff options
context:
space:
mode:
Diffstat (limited to 'tag.c')
-rw-r--r--tag.c11
1 files changed, 11 insertions, 0 deletions
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;
+}