fix:同时校验搜索发现时,搜索正常发现为空时 校验停止的bug

pull/1576/head
Xwite 3 years ago
parent a66bf6f436
commit c3c8649010
  1. 19
      app/src/main/java/io/legado/app/service/CheckSourceService.kt

@ -144,15 +144,18 @@ class CheckSourceService : BaseService() {
} }
} }
if (url.isNullOrBlank()) { if (url.isNullOrBlank()) {
if (source.hasGroup("搜索失效")) { when {
throw NoStackTraceException("搜索内容为空并且没有发现") !CheckSource.checkSearch -> throw NoStackTraceException("没有发现")
} else { source.hasGroup("搜索失效") -> throw NoStackTraceException("搜索内容为空并且没有发现")
throw NoStackTraceException("没有发现") }
} else {
books = WebBook.exploreBookAwait(this, source, url)
if (books.isEmpty()) {
when {
!CheckSource.checkSearch -> throw NoStackTraceException("发现书籍为空")
source.hasGroup("搜索失效") -> throw NoStackTraceException("搜索内容和发现书籍为空")
}
} }
}
books = WebBook.exploreBookAwait(this, source, url)
if (books.isEmpty()) {
throw NoStackTraceException("发现书籍为空")
} }
} }
//校验详情 //校验详情

Loading…
Cancel
Save