pull/32/head
kunfei 5 years ago
parent b51594e418
commit ff8c9983a4
  1. 12
      app/src/main/java/io/legado/app/model/webbook/BookChapterList.kt

@ -26,12 +26,7 @@ object BookChapterList {
var chapterList = arrayListOf<BookChapter>()
val baseUrl: String = NetworkUtils.getUrl(response)
val body: String? = response.body()
body ?: throw Exception(
App.INSTANCE.getString(
R.string.error_get_web_content,
baseUrl
)
)
body ?: throw Exception(App.INSTANCE.getString(R.string.error_get_web_content, baseUrl))
SourceDebug.printLog(bookSource.bookSourceUrl, 1, "获取成功:$baseUrl")
val tocRule = bookSource.getTocRule()
val nextUrlList = arrayListOf(baseUrl)
@ -67,8 +62,9 @@ object BookChapterList {
book,
bookSource
)
nextUrl =
if (chapterData.nextUrl.isNotEmpty()) chapterData.nextUrl[0] else ""
nextUrl = if (chapterData.nextUrl.isNotEmpty())
chapterData.nextUrl[0]
else ""
chapterData.chapterList?.let {
chapterList.addAll(it)
}

Loading…
Cancel
Save