From 82f1c1bb0a260e21a2158fd7a807ffcfffc99419 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Sun, 19 Oct 2025 11:27:28 -0700 Subject: [PATCH] remove webtoon cover (#1124) --- kindlecomicconverter/KCC_gui.py | 6 ++++-- kindlecomicconverter/comic2ebook.py | 14 +++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/kindlecomicconverter/KCC_gui.py b/kindlecomicconverter/KCC_gui.py index d7aac8f..510544b 100644 --- a/kindlecomicconverter/KCC_gui.py +++ b/kindlecomicconverter/KCC_gui.py @@ -488,8 +488,10 @@ class WorkerThread(QThread): k = kindle.Kindle(options.profile) if k.path and k.coverSupport: for item in outputPath: - comic2ebook.options.covers[outputPath.index(item)][0].saveToKindle( - k, comic2ebook.options.covers[outputPath.index(item)][1]) + cover = comic2ebook.options.covers[outputPath.index(item)][0] + if cover: + cover.saveToKindle( + k, comic2ebook.options.covers[outputPath.index(item)][1]) MW.addMessage.emit('Kindle detected. Uploading covers... Done!', 'info', False) else: GUI.progress.content = '' diff --git a/kindlecomicconverter/comic2ebook.py b/kindlecomicconverter/comic2ebook.py index 48b2502..6dc5dd7 100755 --- a/kindlecomicconverter/comic2ebook.py +++ b/kindlecomicconverter/comic2ebook.py @@ -298,8 +298,9 @@ def buildOPF(dstdir, title, filelist, originalpath, cover=None): f.writelines(["", hescape(options.summary), "\n"]) for author in options.authors: f.writelines(["", hescape(author), "\n"]) - f.writelines(["" + strftime("%Y-%m-%dT%H:%M:%SZ", gmtime()) + "\n", - "\n"]) + f.write("" + strftime("%Y-%m-%dT%H:%M:%SZ", gmtime()) + "\n") + if cover: + f.write("\n") if options.iskindle and options.profile != 'Custom': f.writelines(["\n", "