diff --git a/changedetectionio/__init__.py b/changedetectionio/__init__.py index 4cd622b5..8e2b03f8 100644 --- a/changedetectionio/__init__.py +++ b/changedetectionio/__init__.py @@ -416,8 +416,14 @@ def changedetection_app(config=None, datastore_o=None): # Sort by last_changed and add the uuid which is usually the key.. sorted_watches = [] + with_errors = request.args.get('with_errors') == "1" + errored_count = 0 search_q = request.args.get('q').strip().lower() if request.args.get('q') else False for uuid, watch in datastore.data['watching'].items(): + if with_errors and not watch.get('last_error'): + continue + if watch.get('last_error'): + errored_count += 1 if limit_tag and not limit_tag in watch['tags']: continue @@ -442,6 +448,7 @@ def changedetection_app(config=None, datastore_o=None): active_tag=limit_tag, app_rss_token=datastore.data['settings']['application']['rss_access_token'], datastore=datastore, + errored_count=errored_count, form=form, guid=datastore.data['app_guid'], has_proxies=datastore.proxy_list, @@ -855,7 +862,10 @@ def changedetection_app(config=None, datastore_o=None): def mark_all_viewed(): # Save the current newest history as the most recently viewed + with_errors = request.args.get('with_errors') == "1" for watch_uuid, watch in datastore.data['watching'].items(): + if with_errors and not watch.get('last_error'): + continue datastore.set_last_viewed(watch_uuid, int(time.time())) return redirect(url_for('index')) @@ -1264,6 +1274,8 @@ def changedetection_app(config=None, datastore_o=None): # Forced recheck will skip the 'skip if content is the same' rule (, 'reprocess_existing_data': True}))) tag = request.args.get('tag') uuid = request.args.get('uuid') + with_errors = request.args.get('with_errors') == "1" + i = 0 running_uuids = [] @@ -1279,6 +1291,8 @@ def changedetection_app(config=None, datastore_o=None): # Items that have this current tag for watch_uuid, watch in datastore.data['watching'].items(): if tag in watch.get('tags', {}): + if with_errors and not watch.get('last_error'): + continue if watch_uuid not in running_uuids and not datastore.data['watching'][watch_uuid]['paused']: update_q.put( queuedWatchMetaData.PrioritizedItem(priority=1, item={'uuid': watch_uuid, 'skip_when_checksum_same': False}) @@ -1289,8 +1303,11 @@ def changedetection_app(config=None, datastore_o=None): # No tag, no uuid, add everything. for watch_uuid, watch in datastore.data['watching'].items(): if watch_uuid not in running_uuids and not datastore.data['watching'][watch_uuid]['paused']: + if with_errors and not watch.get('last_error'): + continue update_q.put(queuedWatchMetaData.PrioritizedItem(priority=1, item={'uuid': watch_uuid, 'skip_when_checksum_same': False})) i += 1 + flash("{} watches queued for rechecking.".format(i)) return redirect(url_for('index', tag=tag)) diff --git a/changedetectionio/templates/watch-overview.html b/changedetectionio/templates/watch-overview.html index 40b88e2c..5e2cc090 100644 --- a/changedetectionio/templates/watch-overview.html +++ b/changedetectionio/templates/watch-overview.html @@ -178,13 +178,18 @@