mirror of
https://github.com/ciromattia/kcc
synced 2026-05-30 19:23:06 +00:00
Fix fusion output location (#1355)
* Fix fusion output location Use source folder when output folder is not specified * undelete things
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user