From 08070cdd972c1785711b7c44e39f18d6162bb3c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=95=E3=82=A3=E3=83=AB=E3=82=BF=E3=83=BC=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=83=91=E3=83=BC?= <76888457+filterpaper@users.noreply.github.com> Date: Tue, 26 May 2026 07:41:36 +0800 Subject: [PATCH] Fix fusion output location (#1355) * Fix fusion output location Use source folder when output folder is not specified * undelete things --- kindlecomicconverter/KCC_gui.py | 3 +++ kindlecomicconverter/comic2ebook.py | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/kindlecomicconverter/KCC_gui.py b/kindlecomicconverter/KCC_gui.py index e0aa34b..5cfa418 100644 --- a/kindlecomicconverter/KCC_gui.py +++ b/kindlecomicconverter/KCC_gui.py @@ -393,7 +393,10 @@ class WorkerThread(QThread): for job in currentJobs: bookDir.append(job) try: + fusion_source_parent = str(Path(bookDir[0]).parent) comic2ebook.options = comic2ebook.checkOptions(copy(options)) + if options.output is None: + options.output = fusion_source_parent currentJobs.clear() currentJobs.append(comic2ebook.makeFusion(bookDir)) MW.addMessage.emit('Created fusion at ' + currentJobs[0], 'info', False) diff --git a/kindlecomicconverter/comic2ebook.py b/kindlecomicconverter/comic2ebook.py index 999d68f..1fbd156 100755 --- a/kindlecomicconverter/comic2ebook.py +++ b/kindlecomicconverter/comic2ebook.py @@ -76,12 +76,15 @@ def main(argv=None): print('No matching files found.') return 1 if options.filefusion: + fusion_source_parent = str(Path(sources[0]).parent) fusion_path = makeFusion(list(sources)) sources.clear() sources.append(fusion_path) for source in sources: source = source.rstrip('\\').rstrip('/') options = copy(args) + if options.filefusion and options.output is None: + options.output = fusion_source_parent options = checkOptions(options) print('Working on ' + source + '...') makeBook(source) @@ -1683,8 +1686,8 @@ def makeFusion(sources: List[str]): raise UserWarning('Fusion requires at least 2 sources. Did you forget to uncheck fusion?') start = perf_counter() first_path = Path(sources[0]) - - if True: + + if options.tempdir: fusion_parent = first_path.parent else: # LLL is after KCC