[gnome-software/mwleeds/hardcoded-pwa-list: 11/18] epiphany: more debug statements




commit 3bf4179366bf1fd5d1e096e43d4bd0a54ea2de75
Author: Phaedrus Leeds <mwleeds protonmail com>
Date:   Mon Mar 21 16:13:08 2022 -0700

    epiphany: more debug statements

 plugins/epiphany/gs-plugin-epiphany.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/plugins/epiphany/gs-plugin-epiphany.c b/plugins/epiphany/gs-plugin-epiphany.c
index fcc4bf652..a3c4024a6 100644
--- a/plugins/epiphany/gs-plugin-epiphany.c
+++ b/plugins/epiphany/gs-plugin-epiphany.c
@@ -587,7 +587,15 @@ list_installed_apps_thread_cb (GTask        *task,
                 * later use
                 */
                metainfo_app_id = g_hash_table_lookup (self->url_id_map, url);
-               app = gs_epiphany_create_app (self, metainfo_app_id ? metainfo_app_id : desktop_file_id);
+               if (metainfo_app_id) {
+                       g_debug ("Creating GsApp for webapp with URL %s using app ID from metainfo: %s"
+                                " (Epiphany app ID: %s)", url, metainfo_app_id, desktop_file_id);
+                       app = gs_epiphany_create_app (self, metainfo_app_id);
+               } else {
+                       g_debug ("Creating GsApp for webapp with URL %s using app ID from Epiphany: %s",
+                                url, desktop_file_id);
+                       app = gs_epiphany_create_app (self, desktop_file_id);
+               }
                gs_app_set_metadata (app, "epiphany::installed-app-id", desktop_file_id);
 
                gs_app_set_state (app, GS_APP_STATE_INSTALLED);
@@ -741,8 +749,10 @@ refine_thread_cb (GTask        *task,
                        continue;
                }
 
+               g_debug ("epiphany: refining app %s", gs_app_get_id (app));
                source_plugin = gs_app_get_metadata_item (app, "GnomeSoftware::Creator");
                if (g_strcmp0 (source_plugin, "appstream") == 0) {
+                       g_debug ("epiphany: mapping url %s to app %s", url, gs_app_get_id (app));
                        g_hash_table_insert (self->url_id_map, g_strdup (url),
                                             g_strdup (gs_app_get_id (app)));
                }


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