feat(epub): 识别多级目录

pull/1929/head
Xwite 2 years ago
parent dd5b1fb488
commit 8c3dead3dd
  1. 6
      app/src/main/java/io/legado/app/model/localBook/EpubFile.kt

@ -317,16 +317,12 @@ class EpubFile(var book: Book) {
chapter.url = ref.completeHref
chapter.startFragmentId = ref.fragmentId
chapterList.lastOrNull()?.endFragmentId = chapter.startFragmentId
/**
* 二级目录判定 todo
*/
val isVolume = false
chapterList.lastOrNull()?.isVolume = isVolume
chapterList.lastOrNull()?.putVariable("nextUrl", chapter.url)
chapterList.add(chapter)
durIndex++
}
if (ref.children != null && ref.children.isNotEmpty()) {
chapterList.lastOrNull()?.isVolume = true
parseMenu(chapterList, ref.children, level + 1)
}
}

Loading…
Cancel
Save