pull/2117/head
821938089 2 years ago
parent 38e2fe103a
commit 1734ec9cab
  1. 9
      app/src/main/java/io/legado/app/service/CheckSourceService.kt

@ -190,6 +190,15 @@ class CheckSourceService : BaseService() {
}.onSuccess(searchCoroutine) { }.onSuccess(searchCoroutine) {
source.removeGroup("校验超时") source.removeGroup("校验超时")
Debug.updateFinalMessage(source.bookSourceUrl, "校验成功") Debug.updateFinalMessage(source.bookSourceUrl, "校验成功")
}.onCancel(IO) {
source.addGroup("校验超时")
source.bookSourceComment =
"Error: 校验超时" + if (source.bookSourceComment.isNullOrBlank())
"" else "\n\n${source.bookSourceComment}"
Debug.updateFinalMessage(source.bookSourceUrl, "校验失败: 校验超时")
source.respondTime = Debug.getRespondTime(source.bookSourceUrl)
appDb.bookSourceDao.update(source)
onNext(source.bookSourceUrl, source.bookSourceName)
}.onFinally(IO) { }.onFinally(IO) {
source.respondTime = Debug.getRespondTime(source.bookSourceUrl) source.respondTime = Debug.getRespondTime(source.bookSourceUrl)
appDb.bookSourceDao.update(source) appDb.bookSourceDao.update(source)

Loading…
Cancel
Save