From 234a68d80b82f1ef51cfa66c796ffb0eb458e003 Mon Sep 17 00:00:00 2001 From: hius07 <62179190+hius07@users.noreply.github.com> Date: Sun, 14 Jan 2024 18:44:59 +0200 Subject: [PATCH] CoverBrowser: fix cover cache check (#11356) --- plugins/coverbrowser.koplugin/bookinfomanager.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/coverbrowser.koplugin/bookinfomanager.lua b/plugins/coverbrowser.koplugin/bookinfomanager.lua index 4762c8392..ef6cb7aec 100644 --- a/plugins/coverbrowser.koplugin/bookinfomanager.lua +++ b/plugins/coverbrowser.koplugin/bookinfomanager.lua @@ -993,6 +993,9 @@ function BookInfoManager.getCachedCoverSize(img_w, img_h, max_img_w, max_img_h) end function BookInfoManager.isCachedCoverInvalid(bookinfo, cover_specs) + if not bookinfo.cover_w or not bookinfo.cover_h then -- no thumbnail yet + return true + end local img_w, img_h = bookinfo.cover_sizetag:match("(%d+)x(%d+)") -- original image if not img_w or not img_h then -- old or bad cover_sizetag return true