diff --git a/changedetectionio/blueprint/price_data_follower/__init__.py b/changedetectionio/blueprint/price_data_follower/__init__.py index 52b941ac..a41552d8 100644 --- a/changedetectionio/blueprint/price_data_follower/__init__.py +++ b/changedetectionio/blueprint/price_data_follower/__init__.py @@ -18,6 +18,7 @@ def construct_blueprint(datastore: ChangeDetectionStore, update_q: PriorityQueue def accept(uuid): datastore.data['watching'][uuid]['track_ldjson_price_data'] = PRICE_DATA_TRACK_ACCEPT datastore.data['watching'][uuid]['processor'] = 'restock_diff' + datastore.data['watching'][uuid].clear_watch() update_q.put(queuedWatchMetaData.PrioritizedItem(priority=1, item={'uuid': uuid, 'skip_when_checksum_same': False})) return redirect(url_for("index")) diff --git a/changedetectionio/flask_app.py b/changedetectionio/flask_app.py index 012f015a..f07bbfcb 100644 --- a/changedetectionio/flask_app.py +++ b/changedetectionio/flask_app.py @@ -720,6 +720,11 @@ def changedetection_app(config=None, datastore_o=None): if request.method == 'POST' and form.validate(): + # If they changed processor, it makes sense to reset it. + if datastore.data['watching'][uuid].get('processor') != form.data.get('processor'): + datastore.data['watching'][uuid].clear_watch() + flash("Reset watch history due to change of processor") + extra_update_obj = { 'consecutive_filter_failures': 0, 'last_error' : False