Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions changedetectionio/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ class ChangeDetectionStore:
def __init__(self, datastore_path="/datastore", include_default_watches=True, version_tag="0.0.0"):
# Should only be active for docker
# logging.basicConfig(filename='/dev/stdout', level=logging.INFO)
from deepmerge import always_merger

self.__data = App.model()
self.datastore_path = datastore_path
self.json_store_path = os.path.join(self.datastore_path, "url-watches.json")
Expand Down Expand Up @@ -75,14 +77,8 @@ def __init__(self, datastore_path="/datastore", include_default_watches=True, ve
self.__data['app_guid'] = from_disk['app_guid']

if 'settings' in from_disk:
if 'headers' in from_disk['settings']:
self.__data['settings']['headers'].update(from_disk['settings']['headers'])

if 'requests' in from_disk['settings']:
self.__data['settings']['requests'].update(from_disk['settings']['requests'])

if 'application' in from_disk['settings']:
self.__data['settings']['application'].update(from_disk['settings']['application'])
# update the modal with whats on disk
self.__data['settings'] = always_merger.merge(from_disk['settings'], self.__data['settings'])

# Convert each existing watch back to the Watch.model object
for uuid, watch in self.__data['watching'].items():
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jq~=1.3; python_version >= "3.8" and sys_platform == "linux"
# playwright is installed at Dockerfile build time because it's not available on all platforms

pyppeteer-ng==2.0.0rc10
deepmerge

pyppeteerstealth>=0.0.4

Expand Down
Loading