mirror of
https://github.com/ciromattia/kcc
synced 2026-09-01 08:27: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:
|
for job in currentJobs:
|
||||||
bookDir.append(job)
|
bookDir.append(job)
|
||||||
try:
|
try:
|
||||||
|
fusion_source_parent = str(Path(bookDir[0]).parent)
|
||||||
comic2ebook.options = comic2ebook.checkOptions(copy(options))
|
comic2ebook.options = comic2ebook.checkOptions(copy(options))
|
||||||
|
if options.output is None:
|
||||||
|
options.output = fusion_source_parent
|
||||||
currentJobs.clear()
|
currentJobs.clear()
|
||||||
currentJobs.append(comic2ebook.makeFusion(bookDir))
|
currentJobs.append(comic2ebook.makeFusion(bookDir))
|
||||||
MW.addMessage.emit('Created fusion at ' + currentJobs[0], 'info', False)
|
MW.addMessage.emit('Created fusion at ' + currentJobs[0], 'info', False)
|
||||||
|
|||||||
@@ -76,12 +76,15 @@ def main(argv=None):
|
|||||||
print('No matching files found.')
|
print('No matching files found.')
|
||||||
return 1
|
return 1
|
||||||
if options.filefusion:
|
if options.filefusion:
|
||||||
|
fusion_source_parent = str(Path(sources[0]).parent)
|
||||||
fusion_path = makeFusion(list(sources))
|
fusion_path = makeFusion(list(sources))
|
||||||
sources.clear()
|
sources.clear()
|
||||||
sources.append(fusion_path)
|
sources.append(fusion_path)
|
||||||
for source in sources:
|
for source in sources:
|
||||||
source = source.rstrip('\\').rstrip('/')
|
source = source.rstrip('\\').rstrip('/')
|
||||||
options = copy(args)
|
options = copy(args)
|
||||||
|
if options.filefusion and options.output is None:
|
||||||
|
options.output = fusion_source_parent
|
||||||
options = checkOptions(options)
|
options = checkOptions(options)
|
||||||
print('Working on ' + source + '...')
|
print('Working on ' + source + '...')
|
||||||
makeBook(source)
|
makeBook(source)
|
||||||
@@ -1684,7 +1687,7 @@ def makeFusion(sources: List[str]):
|
|||||||
start = perf_counter()
|
start = perf_counter()
|
||||||
first_path = Path(sources[0])
|
first_path = Path(sources[0])
|
||||||
|
|
||||||
if True:
|
if options.tempdir:
|
||||||
fusion_parent = first_path.parent
|
fusion_parent = first_path.parent
|
||||||
else:
|
else:
|
||||||
# LLL is after KCC
|
# LLL is after KCC
|
||||||
|
|||||||
Reference in New Issue
Block a user