[gnome-software] trivial: Make --cache-age set the age for the GET_RECENT action



commit 1c79ad081c6ab965981dd6676558d54c0301088d
Author: Richard Hughes <richard hughsie com>
Date:   Fri May 19 20:19:40 2017 +0100

    trivial: Make --cache-age set the age for the GET_RECENT action

 lib/gs-cmd.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/lib/gs-cmd.c b/lib/gs-cmd.c
index 582089b..39f7038 100644
--- a/lib/gs-cmd.c
+++ b/lib/gs-cmd.c
@@ -470,12 +470,14 @@ main (int argc, char **argv)
                        }
                }
        } else if (argc == 2 && g_strcmp0 (argv[1], "recent") == 0) {
+               if (cache_age == 0)
+                       cache_age = 60 * 60 * 24 * 60;
                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_RECENT,
-                                                        "age", 60 * 60 * 24 * 60,
+                                                        "age", cache_age,
                                                         "refine-flags", refine_flags,
                                                         "max-results", max_results,
                                                         NULL);


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