From 68af8ee10a174e9612af912eae4c7d2967d9524f Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 22 Aug 2021 19:51:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/model/webBook/BookInfo.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/model/webBook/BookInfo.kt b/app/src/main/java/io/legado/app/model/webBook/BookInfo.kt index a06f32d74..d479172a3 100644 --- a/app/src/main/java/io/legado/app/model/webBook/BookInfo.kt +++ b/app/src/main/java/io/legado/app/model/webBook/BookInfo.kt @@ -119,7 +119,7 @@ object BookInfo { Debug.log(bookSource.bookSourceUrl, "┌获取封面链接") try { 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}") } catch (e: Exception) { @@ -128,8 +128,8 @@ object BookInfo { scope.ensureActive() Debug.log(bookSource.bookSourceUrl, "┌获取目录链接") book.tocUrl = analyzeRule.getString(infoRule.tocUrl, true) - if (book.tocUrl.isEmpty()) book.tocUrl = baseUrl - if (book.tocUrl == baseUrl) { + if (book.tocUrl.isEmpty()) book.tocUrl = redirectUrl + if (book.tocUrl == redirectUrl) { book.tocHtml = body } Debug.log(bookSource.bookSourceUrl, "└${book.tocUrl}")