diff --git a/kcc/comic2ebook.py b/kcc/comic2ebook.py index d3d45e7..9c990e2 100755 --- a/kcc/comic2ebook.py +++ b/kcc/comic2ebook.py @@ -187,7 +187,7 @@ def buildHTML(path, imgfile): return path, imgfile -def buildNCX(dstdir, title, chapters): +def buildNCX(dstdir, title, chapters, chapterNames): options.uuid = str(uuid4()) ncxfile = os.path.join(dstdir, 'OEBPS', 'toc.ncx') f = open(ncxfile, "w", encoding='UTF-8') @@ -208,7 +208,7 @@ def buildNCX(dstdir, title, chapters): for chapter in chapters: folder = chapter[0].replace(os.path.join(dstdir, 'OEBPS'), '').lstrip('/').lstrip('\\\\') if os.path.basename(folder) != "Text": - title = os.path.basename(folder) + title = chapterNames[os.path.basename(folder)] filename = getImageFileName(os.path.join(folder, chapter[1])) f.write("" + title + " 1: filepath.append(getOutputFilename(args[0], options.output, '.epub', ' ' + str(tomeNumber)))