Parcourir la source

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

Xwite il y a 4 ans
Parent
commit
f787f754e1

+ 4 - 1
app/src/main/java/io/legado/app/service/CheckSourceService.kt

@@ -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
                     //校验正文