Mercurial > hg > Feedworm
diff backend/couchdb/CouchDbBackend.py @ 175:57e324fa4350
implement getting a list of feeds that have unread entries
author | dirk |
---|---|
date | Fri, 09 Sep 2011 18:17:57 +0200 |
parents | d0ced79b5030 |
children | 7001070d0bd5 |
line wrap: on
line diff
--- a/backend/couchdb/CouchDbBackend.py Fri Sep 09 17:21:34 2011 +0200 +++ b/backend/couchdb/CouchDbBackend.py Fri Sep 09 18:17:57 2011 +0200 @@ -38,7 +38,11 @@ return self.feeds def _getUnreadFeeds(self): - raise Exception("not yet implemented") + viewResults = self.database.view(CouchDb.feedsWithUnreadEntries(), group=True) + feeds = [] + for row in viewResults: + feeds.append(Feed.load(self.database, row["key"])) + return feeds def _retrieveEntriesForSelectedFeed(self, hideReadEntries): # TODO how to hide read entries if requested?