Customisable notifications (#123)

* Customisable notifications (#121)
* Test improvements
* Setup BASE_URL environment in test

Co-authored-by: dtomlinson91 <53234158+dtomlinson91@users.noreply.github.com>
This commit is contained in:
dgtlmoon
2021-07-13 18:48:21 +10:00
committed by GitHub
parent 655a350f50
commit dad48402f1
14 changed files with 330 additions and 92 deletions

View File

@@ -39,7 +39,10 @@ class ChangeDetectionStore:
'application': {
'password': False,
'extract_title_as_title': False,
'notification_urls': [] # Apprise URL list
'notification_urls': [], # Apprise URL list
# Custom notification content
'notification_title': 'ChangeDetection.io Notification - {watch_url}',
'notification_body': '{base_url}'
}
}
}
@@ -176,7 +179,6 @@ class ChangeDetectionStore:
@property
def data(self):
has_unviewed = False
for uuid, v in self.__data['watching'].items():
self.__data['watching'][uuid]['newest_history_key'] = self.get_newest_history_key(uuid)
@@ -191,8 +193,6 @@ class ChangeDetectionStore:
if not self.__data['watching'][uuid]['title']:
self.__data['watching'][uuid]['title'] = None
self.__data['has_unviewed'] = has_unviewed
return self.__data
@@ -355,7 +355,7 @@ class ChangeDetectionStore:
if self.stop_thread:
print("Shutting down datastore thread")
return
if self.needs_write:
self.sync_to_json()
time.sleep(3)