Update BookContent.kt

恢复
pull/1126/head
bushixuanqi 3 years ago committed by GitHub
parent bc1fb68c27
commit bde4480190
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      app/src/main/java/io/legado/app/model/webBook/BookContent.kt

@ -52,7 +52,7 @@ object BookContent {
var contentData = analyzeContent(
book, baseUrl, redirectUrl, body, contentRule, bookChapter, bookSource, mNextChapterUrl
)
content.append(contentData.content)
content.append(contentData.content).append("\n")
if (contentData.nextUrl.size == 1) {
var nextUrl = contentData.nextUrl[0]
while (nextUrl.isNotEmpty() && !nextUrlList.contains(nextUrl)) {
@ -74,7 +74,7 @@ object BookContent {
)
nextUrl =
if (contentData.nextUrl.isNotEmpty()) contentData.nextUrl[0] else ""
content.append("\n").append(contentData.content)
content.append(contentData.content).append("\n")
}
}
Debug.log(bookSource.bookSourceUrl, "◇本章总页数:${nextUrlList.size}")
@ -98,10 +98,11 @@ object BookContent {
}
asyncArray.forEach { coroutine ->
scope.ensureActive()
content.append("\n").append(coroutine.await())
content.append(coroutine.await()).append("\n")
}
}
}
content.deleteCharAt(content.length - 1)
var contentStr = content.toString()
val replaceRegex = contentRule.replaceRegex
if (!replaceRegex.isNullOrEmpty()) {
@ -149,4 +150,4 @@ object BookContent {
}
return ContentData(content, nextUrlList)
}
}
}

Loading…
Cancel
Save