aboutsummaryrefslogtreecommitdiff
path: root/src/web/controllers/feed.py
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-10-12 17:48:41 +0200
committerFrançois Schmidts <francois.schmidts@gmail.com>2016-01-26 23:46:31 +0100
commit7cbbcb59f4c434fbd7e74e85c90e98fadd189b65 (patch)
treef979fd6300b8767c8bbca0a7ac5c3ee831df49df /src/web/controllers/feed.py
parentupdating translations (diff)
downloadnewspipe-7cbbcb59f4c434fbd7e74e85c90e98fadd189b65.tar.gz
newspipe-7cbbcb59f4c434fbd7e74e85c90e98fadd189b65.tar.bz2
newspipe-7cbbcb59f4c434fbd7e74e85c90e98fadd189b65.zip
adding, improving UI to manage categories
Diffstat (limited to 'src/web/controllers/feed.py')
-rw-r--r--src/web/controllers/feed.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/web/controllers/feed.py b/src/web/controllers/feed.py
index b76c4e42..31a1ec41 100644
--- a/src/web/controllers/feed.py
+++ b/src/web/controllers/feed.py
@@ -87,6 +87,9 @@ class FeedController(AbstractController):
inactives.sort(key=lambda tup: tup[1], reverse=True)
return inactives
+ def count_by_category(self, **filters):
+ return self._count_by(Feed.category_id, filters)
+
def _ensure_icon(self, attrs):
if not attrs.get('icon_url'):
return
@@ -101,10 +104,9 @@ class FeedController(AbstractController):
def update(self, filters, attrs):
from .article import ArticleController
self._ensure_icon(attrs)
- result = super().update(filters, attrs)
if 'category_id' in attrs:
art_contr = ArticleController(self.user_id)
for feed in self.read(**filters):
art_contr.update({'feed_id': feed.id},
- {'category_id': feed.category_id})
- return result
+ {'category_id': attrs['category_id']})
+ return super().update(filters, attrs)
bgstack15