From 3801d339f5f803de84ff18c36d8436e09c6011b8 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sun, 7 May 2023 13:47:17 +0200 Subject: [PATCH] UI - Adding shortcut list select button for "clear/reset history" --- changedetectionio/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/changedetectionio/__init__.py b/changedetectionio/__init__.py index aeb6f555..1afddfd1 100644 --- a/changedetectionio/__init__.py +++ b/changedetectionio/__init__.py @@ -1313,6 +1313,13 @@ def changedetection_app(config=None, datastore_o=None): update_q.put(queuedWatchMetaData.PrioritizedItem(priority=1, item={'uuid': uuid, 'skip_when_checksum_same': False})) flash("{} watches queued for rechecking".format(len(uuids))) + elif (op == 'clear-history'): + for uuid in uuids: + uuid = uuid.strip() + if datastore.data['watching'].get(uuid): + datastore.clear_watch_history(uuid) + flash("{} watches cleared/reset.".format(len(uuids))) + elif (op == 'notification-default'): from changedetectionio.notification import ( default_notification_format_for_watch