mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
@@ -139,10 +139,10 @@ class EpubFile(var book: Book) {
|
||||
* content src text/000001.html(当前章节)
|
||||
- * content src text/000001.html#toc_id_x (下一章节)
|
||||
*/
|
||||
if (!nextUrl.isNullOrBlank() && res.href == nextUrl!!.substringBeforeLast("#")) break
|
||||
if (res.href == nextUrl?.substringBeforeLast("#")) break
|
||||
} else if (isChapter) {
|
||||
// fix 最后一章存在多个html时 内容缺失
|
||||
if (!nextUrl.isNullOrBlank() && res.href == nextUrl.substringBeforeLast("#")) {
|
||||
if (res.href == nextUrl?.substringBeforeLast("#")) {
|
||||
break
|
||||
}
|
||||
elements.add(getBody(res, startFragmentId, endFragmentId))
|
||||
@@ -276,8 +276,12 @@ class EpubFile(var book: Book) {
|
||||
while (i < contents.size) {
|
||||
val content = contents[i]
|
||||
if (!content.mediaType.toString().contains("htm")) continue
|
||||
/*检索到第一章href停止*/
|
||||
if (refs[0].completeHref == content.href) break
|
||||
/**
|
||||
* 检索到第一章href停止
|
||||
* completeHref可能有fragment(#id) 必须去除
|
||||
* fix https://github.com/gedoor/legado/issues/1932
|
||||
*/
|
||||
if (refs[0].completeHref.substringBeforeLast("#") == content.href) break
|
||||
val chapter = BookChapter()
|
||||
var title = content.title
|
||||
if (TextUtils.isEmpty(title)) {
|
||||
|
||||
Reference in New Issue
Block a user