feat(epub): 识别多级目录
This commit is contained in:
@@ -317,16 +317,12 @@ class EpubFile(var book: Book) {
|
|||||||
chapter.url = ref.completeHref
|
chapter.url = ref.completeHref
|
||||||
chapter.startFragmentId = ref.fragmentId
|
chapter.startFragmentId = ref.fragmentId
|
||||||
chapterList.lastOrNull()?.endFragmentId = chapter.startFragmentId
|
chapterList.lastOrNull()?.endFragmentId = chapter.startFragmentId
|
||||||
/**
|
|
||||||
* 二级目录判定 todo
|
|
||||||
*/
|
|
||||||
val isVolume = false
|
|
||||||
chapterList.lastOrNull()?.isVolume = isVolume
|
|
||||||
chapterList.lastOrNull()?.putVariable("nextUrl", chapter.url)
|
chapterList.lastOrNull()?.putVariable("nextUrl", chapter.url)
|
||||||
chapterList.add(chapter)
|
chapterList.add(chapter)
|
||||||
durIndex++
|
durIndex++
|
||||||
}
|
}
|
||||||
if (ref.children != null && ref.children.isNotEmpty()) {
|
if (ref.children != null && ref.children.isNotEmpty()) {
|
||||||
|
chapterList.lastOrNull()?.isVolume = true
|
||||||
parseMenu(chapterList, ref.children, level + 1)
|
parseMenu(chapterList, ref.children, level + 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user