aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2018-10-31 22:43:42 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2018-10-31 22:43:42 +0100
commit2c9457bfa0978fb6079cf9c778d7870aeab52645 (patch)
treeee4fe3e621949883a478110410aac8514f7b2e08
parentMerge branch 'master' of gitlab.com:newspipe/newspipe (diff)
downloadnewspipe-2c9457bfa0978fb6079cf9c778d7870aeab52645.tar.gz
newspipe-2c9457bfa0978fb6079cf9c778d7870aeab52645.tar.bz2
newspipe-2c9457bfa0978fb6079cf9c778d7870aeab52645.zip
Added an option to not include dead feeds in the OPML export.
-rw-r--r--src/web/templates/management.html6
-rw-r--r--src/web/views/feed.py4
2 files changed, 9 insertions, 1 deletions
diff --git a/src/web/templates/management.html b/src/web/templates/management.html
index 9c6a2e1c..4d7c2da3 100644
--- a/src/web/templates/management.html
+++ b/src/web/templates/management.html
@@ -46,7 +46,11 @@
<div class="form-group">
<div class="input-group">
<label>Include disabled feeds</label>
- <input type="checkbox" class="form-control"name="includedisabled" checked />
+ <input type="checkbox" class="form-control" name="includedisabled" checked />
+ </div>
+ <div class="input-group">
+ <label title="Newspipe encountered too much problems when retrieving these feeds.">Include dead feeds</label>
+ <input type="checkbox" class="form-control" name="includeexceedederrorcount" checked />
</div>
<div class="input-group">
<label>Include private feeds</label>
diff --git a/src/web/views/feed.py b/src/web/views/feed.py
index 39134213..b98a005a 100644
--- a/src/web/views/feed.py
+++ b/src/web/views/feed.py
@@ -281,12 +281,16 @@ def export():
"""
include_disabled = request.args.get('includedisabled', '') == 'on'
include_private = request.args.get('includeprivate', '') == 'on'
+ include_exceeded_error_count = request.args. \
+ get('includeexceedederrorcount', '') == 'on'
filter = {}
if not include_disabled:
filter['enabled'] = True
if not include_private:
filter['private'] = False
+ if not include_exceeded_error_count:
+ filter['error_count__lt'] = conf.DEFAULT_MAX_ERROR
user = UserController(current_user.id).get(id=current_user.id)
feeds = FeedController(current_user.id).read(**filter)
bgstack15