From 2ddb8cebe7b3d17ec289cb1cb41e2c09744f2b4c Mon Sep 17 00:00:00 2001 From: Xwite <1797350009@qq.com> Date: Thu, 13 Jan 2022 17:23:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E7=BA=A7=E7=9B=AE=E5=BD=95=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E7=9A=84=E5=8D=B7=E8=BF=9E=E6=8E=A5=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=20=E9=98=85=E8=AF=BB=E7=95=8C=E9=9D=A2=E7=9A=84=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=E8=BF=94=E5=9B=9E=E4=B8=BA=E7=9B=AE=E5=BD=95=E9=A1=B5?= =?UTF-8?q?=E7=9A=84=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/data/entities/BookChapter.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/io/legado/app/data/entities/BookChapter.kt b/app/src/main/java/io/legado/app/data/entities/BookChapter.kt index cf5b2b2b7..5c80fc034 100644 --- a/app/src/main/java/io/legado/app/data/entities/BookChapter.kt +++ b/app/src/main/java/io/legado/app/data/entities/BookChapter.kt @@ -109,6 +109,8 @@ data class BookChapter( } fun getAbsoluteURL(): String { + //二级目录解析的卷链接为空 返回目录页的链接 + if (url.startsWith(title) && isVolume) return baseUrl val urlMatcher = AnalyzeUrl.paramPattern.matcher(url) val urlBefore = if (urlMatcher.find()) url.substring(0, urlMatcher.start()) else url val urlAbsoluteBefore = NetworkUtils.getAbsoluteURL(baseUrl, urlBefore)