aboutsummaryrefslogtreecommitdiff
path: root/src/web/views/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/views/views.py')
-rw-r--r--src/web/views/views.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/web/views/views.py b/src/web/views/views.py
index cc9b421c..1b079d9f 100644
--- a/src/web/views/views.py
+++ b/src/web/views/views.py
@@ -244,10 +244,13 @@ def get_menu():
categories = {c.id: c.dump() for c in CategoryController(g.user.id).read()}
categories[0] = {'name': 'No category', 'id': 0}
unread = ArticleController(g.user.id).count_by_feed(readed=False)
+ feed_in_error = False
for cat_id in categories:
categories[cat_id]['unread'] = 0
categories[cat_id]['feeds'] = []
for feed in FeedController(g.user.id).read():
+ if feed.error_count > 3:
+ feed_in_error = True
feed = feed.dump()
feed['category_id'] = feed['category_id'] or 0
feed['unread'] = unread.get(feed['id'], 0)
@@ -256,6 +259,7 @@ def get_menu():
categories[feed['category_id']]['unread'] += feed['unread']
categories[feed['category_id']]['feeds'].append(feed)
return jsonify(**{'categories': list(categories.values()),
+ 'feed_in_error': feed_in_error,
'all_unread_count': sum(unread.values())})
bgstack15