[gnome-software/mwleeds/hardcoded-pwa-list: 230/232] fix stuff




commit 2daea99c95e69468952d0971d995fd889c67d9f4
Author: Phaedrus Leeds <mwleeds protonmail com>
Date:   Wed Mar 16 17:50:51 2022 -0700

    fix stuff

 plugins/epiphany/gs-plugin-epiphany.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/plugins/epiphany/gs-plugin-epiphany.c b/plugins/epiphany/gs-plugin-epiphany.c
index face4e705..31dab0513 100644
--- a/plugins/epiphany/gs-plugin-epiphany.c
+++ b/plugins/epiphany/gs-plugin-epiphany.c
@@ -489,6 +489,8 @@ gs_epiphany_create_app (GsPluginEpiphany *self,
        app = gs_app_new (id);
        gs_app_set_management_plugin (app, GS_PLUGIN (self));
        gs_app_set_kind (app, AS_COMPONENT_KIND_WEB_APP);
+       gs_app_set_metadata (app, "GnomeSoftware::Creator",
+                            gs_plugin_get_name (GS_PLUGIN (self)));
 
        gs_plugin_cache_add (GS_PLUGIN (self), id, app);
        return g_steal_pointer (&app);
@@ -731,6 +733,7 @@ refine_thread_cb (GTask        *task,
        for (guint i = 0; i < gs_app_list_length (list); i++) {
                GsApp *app = gs_app_list_index (list, i);
                const char *url;
+               const char *source_plugin;
 
                /* not us */
                if (gs_app_get_kind (app) != AS_COMPONENT_KIND_WEB_APP ||
@@ -744,8 +747,11 @@ refine_thread_cb (GTask        *task,
                        continue;
                }
 
-               g_hash_table_insert (self->url_id_map, g_strdup (url),
-                                    g_strdup (gs_app_get_id (app)));
+               source_plugin = gs_app_get_metadata_item (app, "GnomeSoftware::Creator");
+               if (g_strcmp0 (source_plugin, "appstream") == 0) {
+                       g_hash_table_insert (self->url_id_map, g_strdup (url),
+                                            g_strdup (gs_app_get_id (app)));
+               }
 
                gs_epiphany_refine_app (app, url);
                gs_epiphany_refine_app_state (GS_PLUGIN (self), app);


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