|
|
@ -404,17 +404,21 @@ def changedetection_app(config=None, datastore_o=None):
|
|
|
|
global datastore
|
|
|
|
global datastore
|
|
|
|
from changedetectionio import forms
|
|
|
|
from changedetectionio import forms
|
|
|
|
|
|
|
|
|
|
|
|
limit_tag = request.args.get('tag', '').lower().strip()
|
|
|
|
active_tag_req = request.args.get('tag', '').lower().strip()
|
|
|
|
|
|
|
|
active_tag_uuid = active_tag = None
|
|
|
|
|
|
|
|
|
|
|
|
# Be sure limit_tag is a uuid
|
|
|
|
# Be sure limit_tag is a uuid
|
|
|
|
for uuid, tag in datastore.data['settings']['application'].get('tags', {}).items():
|
|
|
|
if active_tag_req:
|
|
|
|
if limit_tag == tag.get('title', '').lower().strip():
|
|
|
|
for uuid, tag in datastore.data['settings']['application'].get('tags', {}).items():
|
|
|
|
limit_tag = uuid
|
|
|
|
if active_tag_req == tag.get('title', '').lower().strip() or active_tag_req == uuid:
|
|
|
|
|
|
|
|
active_tag = tag
|
|
|
|
|
|
|
|
active_tag_uuid = uuid
|
|
|
|
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Redirect for the old rss path which used the /?rss=true
|
|
|
|
# Redirect for the old rss path which used the /?rss=true
|
|
|
|
if request.args.get('rss'):
|
|
|
|
if request.args.get('rss'):
|
|
|
|
return redirect(url_for('rss', tag=limit_tag))
|
|
|
|
return redirect(url_for('rss', tag=active_tag_uuid))
|
|
|
|
|
|
|
|
|
|
|
|
op = request.args.get('op')
|
|
|
|
op = request.args.get('op')
|
|
|
|
if op:
|
|
|
|
if op:
|
|
|
@ -436,7 +440,7 @@ def changedetection_app(config=None, datastore_o=None):
|
|
|
|
if with_errors and not watch.get('last_error'):
|
|
|
|
if with_errors and not watch.get('last_error'):
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
|
|
|
|
|
|
|
|
if limit_tag and not limit_tag in watch['tags']:
|
|
|
|
if active_tag_uuid and not active_tag_uuid in watch['tags']:
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
if watch.get('last_error'):
|
|
|
|
if watch.get('last_error'):
|
|
|
|
errored_count += 1
|
|
|
|
errored_count += 1
|
|
|
@ -459,7 +463,8 @@ def changedetection_app(config=None, datastore_o=None):
|
|
|
|
output = render_template(
|
|
|
|
output = render_template(
|
|
|
|
"watch-overview.html",
|
|
|
|
"watch-overview.html",
|
|
|
|
# Don't link to hosting when we're on the hosting environment
|
|
|
|
# Don't link to hosting when we're on the hosting environment
|
|
|
|
active_tag=limit_tag,
|
|
|
|
active_tag=active_tag,
|
|
|
|
|
|
|
|
active_tag_uuid=active_tag_uuid,
|
|
|
|
app_rss_token=datastore.data['settings']['application']['rss_access_token'],
|
|
|
|
app_rss_token=datastore.data['settings']['application']['rss_access_token'],
|
|
|
|
datastore=datastore,
|
|
|
|
datastore=datastore,
|
|
|
|
errored_count=errored_count,
|
|
|
|
errored_count=errored_count,
|
|
|
|