aboutsummaryrefslogtreecommitdiff
path: root/src/web/views/feed.py
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-10-11 12:18:07 +0200
committerFrançois Schmidts <francois.schmidts@gmail.com>2016-01-26 23:46:30 +0100
commit5b7db9398abaacea241d9fcce7885457c562d7fa (patch)
treeef8982202ac7492892ba184c66c67a303c8cc795 /src/web/views/feed.py
parentassigning categories to feeds and articles (diff)
downloadnewspipe-5b7db9398abaacea241d9fcce7885457c562d7fa.tar.gz
newspipe-5b7db9398abaacea241d9fcce7885457c562d7fa.tar.bz2
newspipe-5b7db9398abaacea241d9fcce7885457c562d7fa.zip
a bit of cleaning, putting code where it belongs
Diffstat (limited to 'src/web/views/feed.py')
-rw-r--r--src/web/views/feed.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/web/views/feed.py b/src/web/views/feed.py
index 68d8765a..6569d1b7 100644
--- a/src/web/views/feed.py
+++ b/src/web/views/feed.py
@@ -217,3 +217,29 @@ def process_form(feed_id=None):
flash(gettext("Downloading articles for the new feed..."), 'info')
return redirect(url_for('feed.form', feed_id=new_feed.id))
+
+
+@feeds_bp.route('/inactives', methods=['GET'])
+@login_required
+def inactives():
+ """
+ List of inactive feeds.
+ """
+ nb_days = int(request.args.get('nb_days', 365))
+ inactives = FeedController(g.user.id).get_inactives(nb_days)
+ return render_template('inactives.html',
+ inactives=inactives, nb_days=nb_days)
+
+
+@feed_bp.route('/duplicates/<int:feed_id>', methods=['GET'])
+@login_required
+def duplicates(feed_id):
+ """
+ Return duplicates article for a feed.
+ """
+ feed, duplicates = FeedController(g.user.id).get_duplicates(feed_id)
+ if len(duplicates) == 0:
+ flash(gettext('No duplicates in the feed "{}".').format(feed.title),
+ 'info')
+ return redirect('home')
+ return render_template('duplicates.html', duplicates=duplicates, feed=feed)
bgstack15