[gnome-software/1409-add-available-for-fedora-section-to-the-explore-page: 184/187] gs-cmd: Add "get-distro-featured" command line option




commit ae5d1fb47d8c2e70874c9c99073f2f71797d26a6
Author: Milan Crha <mcrha redhat com>
Date:   Wed Sep 8 15:55:13 2021 +0200

    gs-cmd: Add "get-distro-featured" command line option
    
    It can be used to check the list of the distro-featured applications
    from the command line.

 lib/gs-cmd.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
---
diff --git a/lib/gs-cmd.c b/lib/gs-cmd.c
index 3c30f59e4..5761ac117 100644
--- a/lib/gs-cmd.c
+++ b/lib/gs-cmd.c
@@ -594,6 +594,22 @@ main (int argc, char **argv)
                                break;
                        }
                }
+       } else if (argc == 2 && g_strcmp0 (argv[1], "distro-featured") == 0) {
+               for (i = 0; i < repeat; i++) {
+                       g_autoptr(GsPluginJob) plugin_job = NULL;
+                       if (list != NULL)
+                               g_object_unref (list);
+                       plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_GET_DISTRO_FEATURED,
+                                                        "refine-flags", self->refine_flags,
+                                                        "max-results", self->max_results,
+                                                        NULL);
+                       list = gs_plugin_loader_job_process (self->plugin_loader, plugin_job,
+                                                             NULL, &error);
+                       if (list == NULL) {
+                               ret = FALSE;
+                               break;
+                       }
+               }
        } else if (argc == 2 && g_strcmp0 (argv[1], "recent") == 0) {
                if (cache_age == 0)
                        cache_age = 60 * 60 * 24 * 60;


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