Ability to set which text to process triggers on (added, removed, changed) according to the difference (#1483)

This commit is contained in:
dgtlmoon
2023-03-20 20:16:57 +01:00
committed by GitHub
parent 66b892f770
commit 55b6ae86e8
14 changed files with 277 additions and 41 deletions

View File

@@ -601,6 +601,16 @@ def changedetection_app(config=None, datastore_o=None):
if datastore.proxy_list is not None and form.data['proxy'] == '':
extra_update_obj['proxy'] = None
# Unsetting all filter_text methods should make it go back to default
# This particularly affects tests running
if 'filter_text_added' in form.data and not form.data.get('filter_text_added') \
and 'filter_text_replaced' in form.data and not form.data.get('filter_text_replaced') \
and 'filter_text_removed' in form.data and not form.data.get('filter_text_removed'):
extra_update_obj['filter_text_added'] = True
extra_update_obj['filter_text_replaced'] = True
extra_update_obj['filter_text_removed'] = True
datastore.data['watching'][uuid].update(form.data)
datastore.data['watching'][uuid].update(extra_update_obj)