1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-13 09:46:25 +00:00

fix bookmarks generation (#1100)

- generate bookmarks if they are present in
ComicInfo.xml file
This commit is contained in:
kiryl85
2025-10-06 22:01:39 +02:00
committed by GitHub
parent 1e4434fc7c
commit a6ee867da2

View File

@@ -553,11 +553,11 @@ def buildEPUB(path, chapternames, tomenumber, ischunked, cover: image.Cover, ori
filelist.append(buildHTML(dirpath, afile, os.path.join(dirpath, afile)))
build_html_end = perf_counter()
print(f"buildHTML: {build_html_end - build_html_start} seconds")
# Overwrite chapternames if tree is flat and ComicInfo.xml has bookmarks
# Overwrite chapternames if ComicInfo.xml has bookmarks
if ischunked:
options.comicinfo_chapters = []
if not chapternames and options.comicinfo_chapters:
if options.comicinfo_chapters:
chapterlist = []
global_diff = 0
@@ -964,7 +964,7 @@ def getMetadata(path, originalpath):
if xml.data['Series']:
options.title = xml.data['Series']
if xml.data['Volume']:
titleSuffix += ' V' + xml.data['Volume'].zfill(2)
titleSuffix += ' Vol. ' + xml.data['Volume'].zfill(2)
if xml.data['Number']:
titleSuffix += ' #' + xml.data['Number'].zfill(3)
options.title += titleSuffix