summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-04-18 09:32:28 +0100
committerRichard Hughes <richard@hughsie.com>2016-04-18 09:32:28 +0100
commitc0081a38f73d3fa11de15431b418a3119999e88d (patch)
tree741f4e6233b323df7ce97a58584333a34e7f206b
parent1d71fb4079c8e2063c631209bb9aa92f30145cf7 (diff)
downloadappstream-glib-c0081a38f73d3fa11de15431b418a3119999e88d.tar.gz
Add the Audio+Video categories from AppStream XML too
-rw-r--r--libappstream-glib/as-app.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c
index 9d1ed00..b7a8e73 100644
--- a/libappstream-glib/as-app.c
+++ b/libappstream-glib/as-app.c
@@ -2198,7 +2198,6 @@ as_app_add_category (AsApp *app, const gchar *category)
if (g_strcmp0 (category, "AudioVideo") == 0) {
as_app_add_category (app, "Audio");
as_app_add_category (app, "Video");
- return;
}
g_ptr_array_add (priv->categories, g_strdup (category));
@@ -3778,10 +3777,10 @@ as_app_node_parse_child (AsApp *app, GNode *n, AsAppParseFlags flags,
for (c = n->children; c != NULL; c = c->next) {
if (as_node_get_tag (c) != AS_TAG_CATEGORY)
continue;
- taken = as_node_take_data (c);
- if (taken == NULL)
+ tmp = as_node_get_data (c);
+ if (tmp == NULL)
continue;
- g_ptr_array_add (priv->categories, taken);
+ as_app_add_category (app, tmp);
}
break;