pull/1272/head
gedoor 3 years ago
parent 86897da5ea
commit 9d4d105c2a
  1. 10
      app/src/main/java/io/legado/app/help/BookSourceAnalyzer.kt
  2. 1
      app/src/main/java/io/legado/app/help/storage/ImportOldData.kt
  3. 2
      app/src/main/java/io/legado/app/service/BaseReadAloudService.kt
  4. 2
      app/src/main/java/io/legado/app/ui/association/ImportBookSourceViewModel.kt
  5. 2
      app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditViewModel.kt

@ -1,4 +1,4 @@
package io.legado.app.help.storage
package io.legado.app.help
import androidx.annotation.Keep
import com.jayway.jsonpath.JsonPath
@ -100,10 +100,10 @@ object BookSourceAnalyzer {
source.enabled = sourceAny.enabled
source.enabledExplore = sourceAny.enabledExplore
source.header = sourceAny.header
source.loginUrl = if (sourceAny.loginUrl is String) {
sourceAny.loginUrl.toString()
} else {
JsonPath.parse(sourceAny.loginUrl).readString("url")
source.loginUrl = when (sourceAny.loginUrl) {
null -> null
is String -> sourceAny.loginUrl.toString()
else -> JsonPath.parse(sourceAny.loginUrl).readString("url")
}
source.loginUi = sourceAny.loginUi
source.loginCheckJs = sourceAny.loginCheckJs

@ -5,6 +5,7 @@ import android.net.Uri
import androidx.documentfile.provider.DocumentFile
import io.legado.app.data.appDb
import io.legado.app.data.entities.BookSource
import io.legado.app.help.BookSourceAnalyzer
import io.legado.app.utils.DocumentUtils
import io.legado.app.utils.FileUtils
import io.legado.app.utils.isContentScheme

@ -198,9 +198,9 @@ abstract class BaseReadAloudService : BaseService(),
}
private fun startDs() {
handler.removeCallbacks(dsRunnable)
postEvent(EventBus.TTS_DS, timeMinute)
upNotification()
handler.removeCallbacks(dsRunnable)
handler.postDelayed(dsRunnable, 60000)
}

@ -9,12 +9,12 @@ import io.legado.app.constant.AppPattern
import io.legado.app.data.appDb
import io.legado.app.data.entities.BookSource
import io.legado.app.help.AppConfig
import io.legado.app.help.BookSourceAnalyzer
import io.legado.app.help.ContentProcessor
import io.legado.app.help.SourceHelp
import io.legado.app.help.http.newCall
import io.legado.app.help.http.okHttpClient
import io.legado.app.help.http.text
import io.legado.app.help.storage.BookSourceAnalyzer
import io.legado.app.help.storage.Restore
import io.legado.app.utils.isAbsUrl
import io.legado.app.utils.isJsonArray

@ -5,9 +5,9 @@ import android.content.Intent
import io.legado.app.base.BaseViewModel
import io.legado.app.data.appDb
import io.legado.app.data.entities.BookSource
import io.legado.app.help.BookSourceAnalyzer
import io.legado.app.help.http.newCallStrResponse
import io.legado.app.help.http.okHttpClient
import io.legado.app.help.storage.BookSourceAnalyzer
import io.legado.app.help.storage.Restore
import io.legado.app.utils.*
import kotlinx.coroutines.Dispatchers

Loading…
Cancel
Save