From 5a437822f1d435ae4bbdab661a93dd2a9fc8d3e0 Mon Sep 17 00:00:00 2001 From: Xwite <1797350009@qq.com> Date: Sat, 5 Feb 2022 10:31:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E6=8F=90=E7=A4=BA:=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E6=8F=90=E7=A4=BA=E6=96=87=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/service/CheckSourceService.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/legado/app/service/CheckSourceService.kt b/app/src/main/java/io/legado/app/service/CheckSourceService.kt index 462e6c23b..0d4ac1351 100644 --- a/app/src/main/java/io/legado/app/service/CheckSourceService.kt +++ b/app/src/main/java/io/legado/app/service/CheckSourceService.kt @@ -189,6 +189,8 @@ class CheckSourceService : BaseService() { } } } + if (source.hasGroup("搜索失效")) throw NoStackTraceException("搜索失效") + if (source.hasGroup("发现失效")) throw NoStackTraceException("发现失效") }.timeout(CheckSource.timeout) .onError(searchCoroutine) { source.addGroup("失效") @@ -204,11 +206,7 @@ class CheckSourceService : BaseService() { ?.filterNot { it.startsWith("Error: ") }?.joinToString("\n") - if (source.hasGroup("搜索失效") || source.hasGroup("发现失效")) { - Debug.updateFinalMessage(source.bookSourceUrl, "失败") - } else { - Debug.updateFinalMessage(source.bookSourceUrl, "成功") - } + Debug.updateFinalMessage(source.bookSourceUrl, "成功") }.onFinally(searchCoroutine) { source.respondTime = Debug.getRespondTime(source.bookSourceUrl) appDb.bookSourceDao.update(source)