From 6a33aee2419abb7f46b3e0425a73167ce121743f Mon Sep 17 00:00:00 2001 From: simesherbs Date: Thu, 13 Mar 2025 12:07:03 -0400 Subject: [PATCH] New "MOBI + EPUB (200MB)" output option (#866) * initial fix * initial * working, but mobi is a bit too large * changed target size to 190mb to account for mobi conversion size increase * changed target size back to 195 * removed debugging print statements * add trailing comma --------- Co-authored-by: Alex Xu --- kindlecomicconverter/KCC_gui.py | 3 ++- kindlecomicconverter/comic2ebook.py | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/kindlecomicconverter/KCC_gui.py b/kindlecomicconverter/KCC_gui.py index d18cea9..b8625b4 100644 --- a/kindlecomicconverter/KCC_gui.py +++ b/kindlecomicconverter/KCC_gui.py @@ -922,7 +922,8 @@ class KCCGUI(KCC_ui.Ui_mainWindow): "CBZ": {'icon': 'CBZ', 'format': 'CBZ'}, "EPUB (Calibre KFX)": {'icon': 'EPUB', 'format': 'KFX'}, "MOBI + EPUB": {'icon': 'MOBI', 'format': 'MOBI+EPUB'}, - "EPUB (200MB limit)": {'icon': 'EPUB', 'format': 'EPUB-200MB'} + "EPUB (200MB limit)": {'icon': 'EPUB', 'format': 'EPUB-200MB'}, + "MOBI + EPUB (200MB limit)": {'icon': 'MOBI', 'format': 'MOBI+EPUB-200MB'}, } diff --git a/kindlecomicconverter/comic2ebook.py b/kindlecomicconverter/comic2ebook.py index 5f1678c..572c7be 100755 --- a/kindlecomicconverter/comic2ebook.py +++ b/kindlecomicconverter/comic2ebook.py @@ -1076,6 +1076,12 @@ def checkOptions(options): options.format = 'EPUB' if options.batchsplit != 2: options.batchsplit = 1 + if options.format == 'MOBI+EPUB-200MB': + options.keep_epub = True + options.targetsize = 195 + options.format = 'MOBI' + if options.batchsplit != 2: + options.batchsplit = 1 if options.format == 'MOBI+EPUB': options.keep_epub = True options.format = 'MOBI'