From be7804a1e5b34b0e58030e893b778c993e994d25 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Tue, 9 Jul 2019 12:26:13 -0700 Subject: [PATCH] Sort items by time --- inquisitor/app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inquisitor/app.py b/inquisitor/app.py index 5974796..babbb83 100644 --- a/inquisitor/app.py +++ b/inquisitor/app.py @@ -71,6 +71,9 @@ def root(): total += 1 if not any(map(lambda f: f(item), filters)): active_items.append(item) + # Sort items by time + active_items.sort(key=lambda i: i['time'] if 'time' in i else 0) + logger.info("Returning {} of {} items".format(len(active_items), total)) if item_read_exceptions: read_ex = {