From 7ba8d446772733a10bc27130e350f4959a019cbd Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Wed, 31 Aug 2022 13:26:15 +0200 Subject: [PATCH] Include update func --- changedetectionio/store.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/changedetectionio/store.py b/changedetectionio/store.py index 00e568df..40a5785f 100644 --- a/changedetectionio/store.py +++ b/changedetectionio/store.py @@ -539,4 +539,27 @@ class ChangeDetectionStore: del(watch['last_changed']) except: continue + return + + + def update_5(self): + + from changedetectionio.notification import ( + default_notification_body, + default_notification_format, + default_notification_title, + ) + + for uuid, watch in self.data['watching'].items(): + try: + # If it's all the same to the system settings, then prefer system notification settings + if watch.get('notification_body') == default_notification_body and \ + watch.get('notification_format') == default_notification_format and \ + watch.get('notification_title') == default_notification_title and \ + watch.get('notification_urls') == self.__data['settings']['application']['notification_urls']: + watch['notification_use_default'] = True + else: + watch['notification_use_default'] = False + except: + continue return \ No newline at end of file