diff options
Diffstat (limited to 'newspipe/web/views/home.py')
-rw-r--r-- | newspipe/web/views/home.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/newspipe/web/views/home.py b/newspipe/web/views/home.py index 55739248..a74c5ec2 100644 --- a/newspipe/web/views/home.py +++ b/newspipe/web/views/home.py @@ -25,11 +25,15 @@ def home(): """ filters = _get_filters(request.args) + category_contr = CategoryController(current_user.id) art_contr = ArticleController(current_user.id) + categories = {cat.id: cat for cat in category_contr.read().all()} unread = art_contr.count_by_feed(readed=False) nb_unread = art_contr.read_light(readed=False).count() + unread_by_cat = art_contr.count_by_category(readed=False) + feeds = { feed.id: feed for feed in sorted( @@ -93,6 +97,8 @@ def home(): filter_=filter_, limit=limit, feeds=feeds, + categories=categories, + unread_by_cat=unread_by_cat, liked=liked, unread=dict(unread), articles=articles.all(), |