diff backend/couchdb/CouchDbBackend.py @ 256:f79be01821c4

Arangodb backend, first version which barely works for reading
author Dirk Olmes <dirk@xanthippe.ping.de>
date Wed, 30 Jan 2019 07:11:10 +0100
parents 8e73a8ae863f
children
line wrap: on
line diff
--- a/backend/couchdb/CouchDbBackend.py	Thu Nov 29 18:46:21 2018 +0100
+++ b/backend/couchdb/CouchDbBackend.py	Wed Jan 30 07:11:10 2019 +0100
@@ -34,17 +34,7 @@
     #
     # handling of feeds
     #
-
-    def getFeeds(self):
-        if self.preferences().showOnlyUnreadFeeds():
-            self.feeds = self._getUnreadFeeds()
-        else:
-            # make sure that the results are actually fetched into memory, otherwise we'll pass
-            # a ViewResults instance around which is not what we want
-            self.feeds = list(Feed.all(self.database))
-        return self.feeds
-
-    def _getUnreadFeeds(self):
+    def getUnreadFeeds(self):
         viewResults = self.database.view(CouchDb.feedsWithUnreadEntries(), group=True)
         feedsWithUnreadEntries = []
         for row in viewResults:
@@ -52,6 +42,11 @@
             feedsWithUnreadEntries.append(feed)
         return feedsWithUnreadEntries
 
+    def getAllFeeds(self):
+        # make sure that the results are actually fetched into memory, otherwise we'll pass
+        # a ViewResults instance around which is not what we want
+        return list(Feed.all(self.database))
+
     def _retrieveEntriesForSelectedFeed(self, hideReadEntries):
         viewResults = FeedEntry.entriesForFeed(self.selectedFeed, self.database)
         if hideReadEntries: