This commit is contained in:
kunfei 2023-04-04 18:49:04 +08:00
parent 1a3756012f
commit c0ac572fc5

View File

@ -6,11 +6,9 @@ import io.legado.app.data.entities.Book
import io.legado.app.data.entities.BookChapter
import io.legado.app.data.entities.BookSource
import io.legado.app.data.entities.rule.ContentRule
import io.legado.app.exception.ConcurrentException
import io.legado.app.exception.ContentEmptyException
import io.legado.app.exception.NoStackTraceException
import io.legado.app.help.book.BookHelp
import io.legado.app.help.http.StrResponse
import io.legado.app.model.Debug
import io.legado.app.model.analyzeRule.AnalyzeRule
import io.legado.app.model.analyzeRule.AnalyzeUrl
@ -18,7 +16,6 @@ import io.legado.app.utils.HtmlFormatter
import io.legado.app.utils.NetworkUtils
import kotlinx.coroutines.Dispatchers.IO
import kotlinx.coroutines.async
import kotlinx.coroutines.delay
import kotlinx.coroutines.ensureActive
import kotlinx.coroutines.withContext
import splitties.init.appCtx
@ -56,6 +53,7 @@ object BookContent {
val contentRule = bookSource.getContentRule()
val analyzeRule = AnalyzeRule(book, bookSource).setContent(body, baseUrl)
analyzeRule.setRedirectUrl(redirectUrl)
analyzeRule.chapter = bookChapter
analyzeRule.nextChapterUrl = mNextChapterUrl
coroutineContext.ensureActive()
var contentData = analyzeContent(