From 966600d28e5cfb21a676ca003784e3875d64d414 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sat, 29 Apr 2023 19:20:19 +0200 Subject: [PATCH] UI - Set selected watches as 'viewed' (#1550) --- changedetectionio/__init__.py | 7 +++++++ changedetectionio/templates/watch-overview.html | 1 + 2 files changed, 8 insertions(+) diff --git a/changedetectionio/__init__.py b/changedetectionio/__init__.py index d3388972..1c5f90e1 100644 --- a/changedetectionio/__init__.py +++ b/changedetectionio/__init__.py @@ -1277,6 +1277,13 @@ def changedetection_app(config=None, datastore_o=None): datastore.data['watching'][uuid.strip()]['paused'] = False flash("{} watches unpaused".format(len(uuids))) + elif (op == 'mark-viewed'): + for uuid in uuids: + uuid = uuid.strip() + if datastore.data['watching'].get(uuid): + datastore.set_last_viewed(uuid, int(time.time())) + flash("{} watches updated".format(len(uuids))) + elif (op == 'mute'): for uuid in uuids: uuid = uuid.strip() diff --git a/changedetectionio/templates/watch-overview.html b/changedetectionio/templates/watch-overview.html index 1d0fef8a..142b1302 100644 --- a/changedetectionio/templates/watch-overview.html +++ b/changedetectionio/templates/watch-overview.html @@ -37,6 +37,7 @@ +