From 15d150ac67b9fd2a2a33392c463c0157967d2425 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 12 Nov 2019 19:06:29 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/model/webbook/BookList.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/model/webbook/BookList.kt b/app/src/main/java/io/legado/app/model/webbook/BookList.kt index 7f8252ca3..85e0b9bda 100644 --- a/app/src/main/java/io/legado/app/model/webbook/BookList.kt +++ b/app/src/main/java/io/legado/app/model/webbook/BookList.kt @@ -7,6 +7,7 @@ import io.legado.app.data.entities.SearchBook import io.legado.app.help.BookHelp import io.legado.app.model.analyzeRule.AnalyzeRule import io.legado.app.model.analyzeRule.AnalyzeUrl +import io.legado.app.utils.NetworkUtils object BookList { @@ -189,7 +190,9 @@ object BookList { searchBook.intro = analyzeRule.getString(ruleIntro) SourceDebug.printLog(bookSource.bookSourceUrl, "└${searchBook.intro}", printLog, true) SourceDebug.printLog(bookSource.bookSourceUrl, "┌获取封面链接", printLog) - searchBook.coverUrl = analyzeRule.getString(ruleCoverUrl, true) + analyzeRule.getString(ruleCoverUrl).let { + if (it.isNotEmpty()) searchBook.coverUrl = NetworkUtils.getAbsoluteURL(baseUrl, it) + } SourceDebug.printLog(bookSource.bookSourceUrl, "└${searchBook.coverUrl}", printLog) SourceDebug.printLog(bookSource.bookSourceUrl, "┌获取详情页链接", printLog) searchBook.bookUrl = analyzeRule.getString(ruleBookUrl, true)