From 30251853d7ccc021875c1a89587b8ee8be108a1a Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Tue, 27 Jun 2023 23:43:02 +0200 Subject: [PATCH] Watches werent falling back to global default formats correctly --- changedetectionio/notification.py | 6 ++++++ changedetectionio/update_worker.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/changedetectionio/notification.py b/changedetectionio/notification.py index a9b31702..ca5ea21d 100644 --- a/changedetectionio/notification.py +++ b/changedetectionio/notification.py @@ -92,6 +92,12 @@ def process_notification(n_object, datastore): n_object.get('notification_format', default_notification_format), valid_notification_formats[default_notification_format], ) + + # If we arrived with 'System default' then look it up + if n_format == default_notification_format_for_watch and datastore.data['settings']['application'].get('notification_format') != default_notification_format_for_watch: + # Initially text or whatever + n_format = datastore.data['settings']['application'].get('notification_format', valid_notification_formats[default_notification_format]) + # https://github.com/caronc/apprise/wiki/Development_LogCapture # Anything higher than or equal to WARNING (which covers things like Connection errors) diff --git a/changedetectionio/update_worker.py b/changedetectionio/update_worker.py index 8c43a148..7c2c5792 100644 --- a/changedetectionio/update_worker.py +++ b/changedetectionio/update_worker.py @@ -71,7 +71,7 @@ class update_worker(threading.Thread): from changedetectionio.notification import ( default_notification_format_for_watch, default_notification_body, - default_notification_title, + default_notification_title )