diff options
author | Richard Hughes <richard@hughsie.com> | 2016-07-13 10:05:06 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2016-07-13 10:05:06 +0100 |
commit | 719dc956fcc207135d43efb26090e431d64da7eb (patch) | |
tree | ee0b8f5c1dc4395f7032d918e692e0279dd6419b | |
parent | d6ffb6a0b67ef59d230a003f3ba5062d66dff740 (diff) | |
download | appstream-glib-719dc956fcc207135d43efb26090e431d64da7eb.tar.gz |
Don't add multiple categories for apps with AudioVideo
-rw-r--r-- | libappstream-glib/as-app.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c index 4a5e1e9..dbb4f91 100644 --- a/libappstream-glib/as-app.c +++ b/libappstream-glib/as-app.c @@ -2205,8 +2205,10 @@ as_app_add_category (AsApp *app, const gchar *category) /* split this meta-category up */ if (g_strcmp0 (category, "AudioVideo") == 0) { - as_app_add_category (app, "Audio"); - as_app_add_category (app, "Video"); + if (!as_app_has_category (app, "Audio")) + as_app_add_category (app, "Audio"); + if (!as_app_has_category (app, "Video")) + as_app_add_category (app, "Video"); } g_ptr_array_add (priv->categories, g_strdup (category)); |