From 1a8d74de4aae55b26498e2c00bb47ef28b267497 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Thu, 23 Apr 2026 13:36:49 -0700 Subject: [PATCH] fix webtoon smartcover (#1305) --- kindlecomicconverter/comic2ebook.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kindlecomicconverter/comic2ebook.py b/kindlecomicconverter/comic2ebook.py index 63e96fb..8000c55 100755 --- a/kindlecomicconverter/comic2ebook.py +++ b/kindlecomicconverter/comic2ebook.py @@ -1710,7 +1710,7 @@ def makeBook(source, qtgui=None, job_progress=''): filepath.append(getOutputFilename(source, options.output, '.cbz', ' ' + str(tomeNumber))) else: filepath.append(getOutputFilename(source, options.output, '.cbz', '')) - if cover.smartcover: + if cover and cover.smartcover: cover.save_to_folder(os.path.join(tome, 'OEBPS', 'Images', 'cover.jpg'), tomeNumber, len(tomes)) makeZIP(tome + '_comic', os.path.join(tome, "OEBPS", "Images"), job_progress) elif options.format == 'PDF': @@ -1718,7 +1718,7 @@ def makeBook(source, qtgui=None, job_progress=''): # determine output filename based on source and tome count suffix = (' ' + str(tomeNumber)) if len(tomes) > 1 else '' output_file = getOutputFilename(source, options.output, '.pdf', suffix) - if cover.smartcover: + if cover and cover.smartcover: cover.save_to_folder(os.path.join(tome, 'OEBPS', 'Images', 'cover.jpg'), tomeNumber, len(tomes)) # use optimized buildPDF logic with streaming and compression output_pdf = buildPDF(tome, options.title, job_progress, None, output_file)