feat:文件类书源跳过校验目录正文

This commit is contained in:
Xwite
2022-05-13 18:44:57 +08:00
parent 360aa0806d
commit 1e68ec51f2

View File

@@ -6,6 +6,7 @@ import com.script.ScriptException
import io.legado.app.R
import io.legado.app.base.BaseService
import io.legado.app.constant.AppConst
import io.legado.app.constant.BookType
import io.legado.app.constant.EventBus
import io.legado.app.constant.IntentAction
import io.legado.app.data.appDb
@@ -208,7 +209,9 @@ class CheckSourceService : BaseService() {
mBook = WebBook.getBookInfoAwait(this, source, mBook)
}
//校验目录
if (CheckSource.checkCategory) {
if (CheckSource.checkCategory &&
source.bookSourceType != BookType.file
) {
val toc = WebBook.getChapterListAwait(this, source, mBook).getOrThrow()
val nextChapterUrl = toc.getOrNull(1)?.url ?: toc.first().url
//校验正文