This commit is contained in:
Horis 2024-02-16 15:58:22 +08:00
parent 96588f60c1
commit b11af054c5

View File

@ -14,6 +14,7 @@ import io.legado.app.help.book.isLocal
import io.legado.app.help.config.AppConfig import io.legado.app.help.config.AppConfig
import io.legado.app.help.config.ReadBookConfig import io.legado.app.help.config.ReadBookConfig
import io.legado.app.help.coroutine.Coroutine import io.legado.app.help.coroutine.Coroutine
import io.legado.app.help.globalExecutor
import io.legado.app.model.localBook.TextFile import io.legado.app.model.localBook.TextFile
import io.legado.app.model.webBook.WebBook import io.legado.app.model.webBook.WebBook
import io.legado.app.service.BaseReadAloudService import io.legado.app.service.BaseReadAloudService
@ -29,8 +30,6 @@ import kotlinx.coroutines.cancelChildren
import kotlinx.coroutines.delay import kotlinx.coroutines.delay
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import splitties.init.appCtx import splitties.init.appCtx
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
import kotlin.math.min import kotlin.math.min
@ -65,7 +64,7 @@ object ReadBook : CoroutineScope by MainScope() {
val downloadFailChapters = hashMapOf<Int, Int>() val downloadFailChapters = hashMapOf<Int, Int>()
var contentProcessor: ContentProcessor? = null var contentProcessor: ContentProcessor? = null
val downloadScope = CoroutineScope(SupervisorJob() + IO) val downloadScope = CoroutineScope(SupervisorJob() + IO)
val executor: ExecutorService = Executors.newSingleThreadExecutor() val executor = globalExecutor
//暂时保存跳转前进度 //暂时保存跳转前进度
fun saveCurrentBookProcess() { fun saveCurrentBookProcess() {