mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add iterall method to iterate over entire ResultCache
This commit is contained in:
parent
2e03dcaf6d
commit
7fe122be68
@ -171,6 +171,11 @@ class ResultCache(SearchQueryParser):
|
|||||||
for id in self._map_filtered:
|
for id in self._map_filtered:
|
||||||
yield self._data[id]
|
yield self._data[id]
|
||||||
|
|
||||||
|
def iterall(self):
|
||||||
|
for x in self._data:
|
||||||
|
if x is not None:
|
||||||
|
yield x
|
||||||
|
|
||||||
def universal_set(self):
|
def universal_set(self):
|
||||||
return set([i[0] for i in self._data if i is not None])
|
return set([i[0] for i in self._data if i is not None])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user