From db441a3bd31d622d3dc316b14d676f56c68ca1e1 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 10 Feb 2020 07:36:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A4=9A=E9=A1=B5=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/model/webBook/BookChapterList.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/model/webBook/BookChapterList.kt b/app/src/main/java/io/legado/app/model/webBook/BookChapterList.kt index 965616ea8..b943c3873 100644 --- a/app/src/main/java/io/legado/app/model/webBook/BookChapterList.kt +++ b/app/src/main/java/io/legado/app/model/webBook/BookChapterList.kt @@ -83,9 +83,13 @@ object BookChapterList { else -> { val chapterDataList = arrayListOf>() for (item in chapterData.nextUrl) { - val data = ChapterData(nextUrl = item) - chapterDataList.add(data) + if (!nextUrlList.contains(item)) { + val data = ChapterData(nextUrl = item) + chapterDataList.add(data) + nextUrlList.add(item) + } } + Debug.log(bookSource.bookSourceUrl, "◇目录总页数:${nextUrlList.size}") for (item in chapterDataList) { Coroutine.async(scope = coroutineScope) { val nextBody = AnalyzeUrl(