From 9868c1cc5e31e1bfd7ac292b7b676401e97df1e8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 15 Oct 2019 21:30:09 +0530 Subject: [PATCH] Force reload of all books on next update There have been a lot of changes to the viewer code --- src/calibre/gui2/viewer/convert_book.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/viewer/convert_book.py b/src/calibre/gui2/viewer/convert_book.py index 8a89499765..3272eb72fe 100644 --- a/src/calibre/gui2/viewer/convert_book.py +++ b/src/calibre/gui2/viewer/convert_book.py @@ -21,6 +21,7 @@ from calibre.utils.short_uuid import uuid4 from polyglot.builtins import as_bytes, as_unicode, iteritems DAY = 24 * 3600 +VIEWER_VERSION = 1 def book_cache_dir(): @@ -33,7 +34,7 @@ def cache_lock(): def book_hash(path, size, mtime): path = os.path.normcase(os.path.abspath(path)) - raw = json.dumps((path, size, mtime, RENDER_VERSION)) + raw = json.dumps((path, size, mtime, RENDER_VERSION, VIEWER_VERSION)) if not isinstance(raw, bytes): raw = raw.encode('utf-8') return as_unicode(sha1(raw).hexdigest())