From e96acc92b733c88d27d76d8c1b0a88e472d70c17 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Sun, 8 Aug 2010 17:27:56 +0100 Subject: [PATCH] Change library.caches.refresh to respect search restrictions. Fixes problem where library shows all books after 'managing' something from the tag browser. --- src/calibre/library/caches.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/library/caches.py b/src/calibre/library/caches.py index b778b58c31..fa07ed8b83 100644 --- a/src/calibre/library/caches.py +++ b/src/calibre/library/caches.py @@ -542,6 +542,8 @@ class ResultCache(SearchQueryParser): if field is not None: self.sort(field, ascending) self._map_filtered = list(self._map) + if self.search_restriction: + self.search('', return_matches=False, ignore_search_restriction=False) def seriescmp(self, sidx, siidx, x, y, library_order=None): try: