mirror of
https://github.com/gedoor/legado.git
synced 2024-09-03 09:55:00 +08:00
书源校验:只校验搜索时 搜索结果为空应该抛出异常
This commit is contained in:
parent
9b86bd6115
commit
38185f07fb
@ -124,7 +124,14 @@ class CheckSourceService : BaseService() {
|
||||
//校验搜索 用户设置校验搜索 并且 搜索链接不为空
|
||||
if (CheckSource.checkSearch && !source.searchUrl.isNullOrBlank()) {
|
||||
books = WebBook.searchBookAwait(this, source, searchWord)
|
||||
if (books.isEmpty()) source.addGroup("搜索失效") else source.removeGroup("搜索失效")
|
||||
if (books.isEmpty()) {
|
||||
source.addGroup("搜索失效")
|
||||
if (!CheckSource.checkDiscovery) {
|
||||
throw NoStackTraceException("搜索书籍为空")
|
||||
}
|
||||
} else {
|
||||
source.removeGroup("搜索失效")
|
||||
}
|
||||
}
|
||||
//校验发现
|
||||
if (CheckSource.checkDiscovery) {
|
||||
|
Loading…
Reference in New Issue
Block a user