From d9dd04396efc0d521c47ed471a0537e066dc617a Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Thu, 19 Mar 2026 13:03:03 -0500 Subject: [PATCH] Epub Update: Don't cache cover image with others, trips dedup. --- fanficfare/epubutils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fanficfare/epubutils.py b/fanficfare/epubutils.py index 94e7f4f2..6b6bfa15 100644 --- a/fanficfare/epubutils.py +++ b/fanficfare/epubutils.py @@ -304,6 +304,10 @@ def get_update_data(inputio, for item in contentdom.getElementsByTagName("item"): href=relpath+item.getAttribute("href") if item.getAttribute("media-type").startswith("image/") and getsoups: + if oldcover and href == oldcover[3]: + # don't include cover image, already handled by + # oldcover code and can trip de-dup unintentionally. + continue img_url = href.replace("OEBPS/","") # logger.debug("-->img img:%s"%img_url) if img_url not in images: