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



commit aef9afd391b7060ae115a8aee33b3a422f6d87b6
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 cb2add048..c3d41f0a3 100644
--- a/lib/gs-cmd.c
+++ b/lib/gs-cmd.c
@@ -595,6 +595,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]