From 7fe8d334d421017ef364a0cc9094da05ac5f07c0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 9 Aug 2013 13:44:36 +0530 Subject: [PATCH] Invalidate cover caches when deleting books --- src/calibre/db/cache.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/db/cache.py b/src/calibre/db/cache.py index 677c3168d5..0b58c23c1d 100644 --- a/src/calibre/db/cache.py +++ b/src/calibre/db/cache.py @@ -1351,6 +1351,9 @@ class Cache(object): table.remove_books(book_ids, self.backend) self._search_api.discard_books(book_ids) self._clear_caches(book_ids=book_ids, template_cache=False, search_cache=False) + for cc in self.cover_caches: + for book_id in book_ids: + cc.invalidate(book_id) @read_api def author_sort_strings_for_books(self, book_ids):