From 0c7a81324acf22f0a7725a87d0ab4bea41ab9be5 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 21 Jul 2019 10:03:50 +0800 Subject: [PATCH] up --- .../java/io/legado/app/model/webbook/BookChapterList.kt | 6 ++++++ 1 file changed, 6 insertions(+) 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 64e9a1ca3..264277ccf 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 @@ -31,7 +31,13 @@ class BookChapterList { val nextUrlList = arrayListOf(baseUrl) val chapterData = analyzeChapterList(body, tocRule) chapterList.addAll(chapterData.chapterList) + if (chapterData.nextUrlList.size == 1) { + var nextUrl = chapterData.nextUrlList[0] + while (nextUrl.isNotEmpty() && !nextUrlList.contains(nextUrl)) { + nextUrlList.add(nextUrl) + } + } return chapterList }