aboutsummaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2010-12-03 08:02:11 +0100
committercedricbonhomme <devnull@localhost>2010-12-03 08:02:11 +0100
commit05b0bbb283a2a54b5e49c9d6cb9c99fbe24beb70 (patch)
treee292e49c45fcf957fae5c241b14e469bb6011fd1 /utils.py
parentScheißdreck. Removed useless print (diff)
downloadnewspipe-05b0bbb283a2a54b5e49c9d6cb9c99fbe24beb70.tar.gz
newspipe-05b0bbb283a2a54b5e49c9d6cb9c99fbe24beb70.tar.bz2
newspipe-05b0bbb283a2a54b5e49c9d6cb9c99fbe24beb70.zip
Updated code for new data structure. #3
Diffstat (limited to 'utils.py')
-rwxr-xr-xutils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils.py b/utils.py
index 533f5e4c..576c9ea6 100755
--- a/utils.py
+++ b/utils.py
@@ -393,7 +393,7 @@ def load_feed():
article_object.article_readed = article[4]
article_object.like = article[6]
- feed_object.articles.append(article_object)
+ feed_object.articles[article_id] = article_object
# update the number of favorites articles
nb_favorites = nb_favorites + int(article[6])
@@ -401,7 +401,7 @@ def load_feed():
# informations about a feed
feed_object.nb_articles = len(feed_object.articles)
- feed_object.nb_unread_articles = len([article for article in feed_object.articles \
+ feed_object.nb_unread_articles = len([article for article in feed_object.articles.values() \
if article.article_readed=="0"])
feeds[feed_id] = feed_object
bgstack15