pull/1259/head
gedoor 3 years ago
parent 1f50b2ecfb
commit 68af8ee10a
  1. 6
      app/src/main/java/io/legado/app/model/webBook/BookInfo.kt

@ -119,7 +119,7 @@ object BookInfo {
Debug.log(bookSource.bookSourceUrl, "┌获取封面链接") Debug.log(bookSource.bookSourceUrl, "┌获取封面链接")
try { try {
analyzeRule.getString(infoRule.coverUrl).let { analyzeRule.getString(infoRule.coverUrl).let {
if (it.isNotEmpty()) book.coverUrl = NetworkUtils.getAbsoluteURL(redirectUrl, it) if (it.isNotEmpty()) book.coverUrl = NetworkUtils.getAbsoluteURL(baseUrl, it)
} }
Debug.log(bookSource.bookSourceUrl, "${book.coverUrl}") Debug.log(bookSource.bookSourceUrl, "${book.coverUrl}")
} catch (e: Exception) { } catch (e: Exception) {
@ -128,8 +128,8 @@ object BookInfo {
scope.ensureActive() scope.ensureActive()
Debug.log(bookSource.bookSourceUrl, "┌获取目录链接") Debug.log(bookSource.bookSourceUrl, "┌获取目录链接")
book.tocUrl = analyzeRule.getString(infoRule.tocUrl, true) book.tocUrl = analyzeRule.getString(infoRule.tocUrl, true)
if (book.tocUrl.isEmpty()) book.tocUrl = baseUrl if (book.tocUrl.isEmpty()) book.tocUrl = redirectUrl
if (book.tocUrl == baseUrl) { if (book.tocUrl == redirectUrl) {
book.tocHtml = body book.tocHtml = body
} }
Debug.log(bookSource.bookSourceUrl, "${book.tocUrl}") Debug.log(bookSource.bookSourceUrl, "${book.tocUrl}")

Loading…
Cancel
Save