summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-03-18 11:53:49 +0000
committerRichard Hughes <richard@hughsie.com>2016-03-18 11:53:53 +0000
commitad75a92566903ccff22c59342752b6a5632a7e07 (patch)
treea864a29c4ca170632c4bc346e7bb501cbacb589a
parent8f0f7c31d806b39f54800e4aa2dd67f07892124c (diff)
downloadappstream-glib-ad75a92566903ccff22c59342752b6a5632a7e07.tar.gz
Split up AudioVideo into two categories
Doing this in libappstream-glib means we can do the split when processing desktop files, processing legacy AppStream files and also when building new metadata. Resolves: https://bugzilla.gnome.org/show_bug.cgi?id=763789
-rw-r--r--libappstream-glib/as-app.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c
index 9b5e792..ded1a55 100644
--- a/libappstream-glib/as-app.c
+++ b/libappstream-glib/as-app.c
@@ -2145,6 +2145,13 @@ as_app_add_category (AsApp *app, const gchar *category)
if (g_strcmp0 (category, "Feed") == 0)
category = "News";
+ /* split this meta-category up */
+ 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));
}