diff --git a/src/calibre/library/caches.py b/src/calibre/library/caches.py index 3877314da9..68ed4cc092 100644 --- a/src/calibre/library/caches.py +++ b/src/calibre/library/caches.py @@ -176,6 +176,11 @@ class ResultCache(SearchQueryParser): if x is not None: yield x + def iterallids(self): + idx = self.FIELD_MAP['id'] + for x in self.iterall(): + yield x[idx] + def universal_set(self): return set([i[0] for i in self._data if i is not None])