[gnome-software] trivial: Don't spam the debug log when setting metadata



commit f6285348cf4becabf985c4c16d5df4c10cb70588
Author: Richard Hughes <richard hughsie com>
Date:   Mon Jun 27 13:41:47 2016 +0100

    trivial: Don't spam the debug log when setting metadata

 src/plugins/gs-plugin-hardcoded-featured.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/gs-plugin-hardcoded-featured.c b/src/plugins/gs-plugin-hardcoded-featured.c
index c7961c6..88ea54c 100644
--- a/src/plugins/gs-plugin-hardcoded-featured.c
+++ b/src/plugins/gs-plugin-hardcoded-featured.c
@@ -232,13 +232,15 @@ gs_plugin_refine_app (GsPlugin *plugin,
                      GCancellable *cancellable,
                      GError **error)
 {
+       const gchar *key = "GnomeSoftware::FeatureTile-css";
        guint i;
        for (i = 0; myapps[i].id != NULL; i++) {
                if (g_strcmp0 (gs_app_get_id_no_prefix (app),
                               myapps[i].id) != 0)
                        continue;
-               gs_app_set_metadata (app, "GnomeSoftware::FeatureTile-css",
-                                    myapps[i].css);
+               if (gs_app_get_metadata_item (app, key) != NULL)
+                       continue;
+               gs_app_set_metadata (app, key, myapps[i].css);
        }
        return TRUE;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]