mirror of
https://github.com/gedoor/legado.git
synced 2024-09-03 09:55:00 +08:00
优化
This commit is contained in:
parent
1a3756012f
commit
c0ac572fc5
@ -6,11 +6,9 @@ import io.legado.app.data.entities.Book
|
|||||||
import io.legado.app.data.entities.BookChapter
|
import io.legado.app.data.entities.BookChapter
|
||||||
import io.legado.app.data.entities.BookSource
|
import io.legado.app.data.entities.BookSource
|
||||||
import io.legado.app.data.entities.rule.ContentRule
|
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.ContentEmptyException
|
||||||
import io.legado.app.exception.NoStackTraceException
|
import io.legado.app.exception.NoStackTraceException
|
||||||
import io.legado.app.help.book.BookHelp
|
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.Debug
|
||||||
import io.legado.app.model.analyzeRule.AnalyzeRule
|
import io.legado.app.model.analyzeRule.AnalyzeRule
|
||||||
import io.legado.app.model.analyzeRule.AnalyzeUrl
|
import io.legado.app.model.analyzeRule.AnalyzeUrl
|
||||||
@ -18,7 +16,6 @@ import io.legado.app.utils.HtmlFormatter
|
|||||||
import io.legado.app.utils.NetworkUtils
|
import io.legado.app.utils.NetworkUtils
|
||||||
import kotlinx.coroutines.Dispatchers.IO
|
import kotlinx.coroutines.Dispatchers.IO
|
||||||
import kotlinx.coroutines.async
|
import kotlinx.coroutines.async
|
||||||
import kotlinx.coroutines.delay
|
|
||||||
import kotlinx.coroutines.ensureActive
|
import kotlinx.coroutines.ensureActive
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import splitties.init.appCtx
|
import splitties.init.appCtx
|
||||||
@ -56,6 +53,7 @@ object BookContent {
|
|||||||
val contentRule = bookSource.getContentRule()
|
val contentRule = bookSource.getContentRule()
|
||||||
val analyzeRule = AnalyzeRule(book, bookSource).setContent(body, baseUrl)
|
val analyzeRule = AnalyzeRule(book, bookSource).setContent(body, baseUrl)
|
||||||
analyzeRule.setRedirectUrl(redirectUrl)
|
analyzeRule.setRedirectUrl(redirectUrl)
|
||||||
|
analyzeRule.chapter = bookChapter
|
||||||
analyzeRule.nextChapterUrl = mNextChapterUrl
|
analyzeRule.nextChapterUrl = mNextChapterUrl
|
||||||
coroutineContext.ensureActive()
|
coroutineContext.ensureActive()
|
||||||
var contentData = analyzeContent(
|
var contentData = analyzeContent(
|
||||||
|
Loading…
Reference in New Issue
Block a user