pull/32/head
kunfei 5 years ago
parent bd8e77b499
commit 6dea502771
  1. 22
      app/src/main/java/io/legado/app/model/webbook/BookChapterList.kt

@ -70,18 +70,16 @@ object BookChapterList {
} }
} }
for (item in chapterDataList) { for (item in chapterDataList) {
if (!nextUrlList.contains(item.nextUrl)) { withContext(coroutineScope.coroutineContext) {
withContext(coroutineScope.coroutineContext) { val nextResponse = AnalyzeUrl(ruleUrl = item.nextUrl, book = book).getResponseAsync().await()
val nextResponse = AnalyzeUrl(ruleUrl = item.nextUrl, book = book).getResponseAsync().await() val nextChapterData = analyzeChapterList(
val nextChapterData = analyzeChapterList( nextResponse.body() ?: "",
nextResponse.body() ?: "", item.nextUrl,
item.nextUrl, tocRule,
tocRule, listRule,
listRule, book
book )
) item.chapterList = nextChapterData.chapterList
item.chapterList = nextChapterData.chapterList
}
} }
} }
for (item in chapterDataList) { for (item in chapterDataList) {

Loading…
Cancel
Save