Merge pull request #1576 from Xwite/master

fix:type mismatch
pull/1581/head
kunfei 3 years ago committed by GitHub
commit a4e421eb2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      app/src/main/java/io/legado/app/service/CheckSourceService.kt

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

Loading…
Cancel
Save