|
|
@ -121,8 +121,8 @@ class CheckSourceService : BaseService() { |
|
|
|
searchWord = it |
|
|
|
searchWord = it |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//校验搜索 |
|
|
|
//校验搜索 用户设置校验搜索 并且 搜索链接不为空 |
|
|
|
if (CheckSource.checkSearch) { |
|
|
|
if (CheckSource.checkSearch && !source.searchUrl.isNullOrBlank()) { |
|
|
|
books = WebBook.searchBookAwait(this, source, searchWord) |
|
|
|
books = WebBook.searchBookAwait(this, source, searchWord) |
|
|
|
if (books.isEmpty()) source.addGroup("搜索失效") else source.removeGroup("搜索失效") |
|
|
|
if (books.isEmpty()) source.addGroup("搜索失效") else source.removeGroup("搜索失效") |
|
|
|
} |
|
|
|
} |
|
|
@ -187,7 +187,11 @@ class CheckSourceService : BaseService() { |
|
|
|
?.filterNot { |
|
|
|
?.filterNot { |
|
|
|
it.startsWith("Error: ") |
|
|
|
it.startsWith("Error: ") |
|
|
|
}?.joinToString("\n") |
|
|
|
}?.joinToString("\n") |
|
|
|
|
|
|
|
if (source.hasGroup("搜索失效")) { |
|
|
|
|
|
|
|
Debug.updateFinalMessage(source.bookSourceUrl, "失败") |
|
|
|
|
|
|
|
} else { |
|
|
|
Debug.updateFinalMessage(source.bookSourceUrl, "成功") |
|
|
|
Debug.updateFinalMessage(source.bookSourceUrl, "成功") |
|
|
|
|
|
|
|
} |
|
|
|
}.onFinally(searchCoroutine) { |
|
|
|
}.onFinally(searchCoroutine) { |
|
|
|
source.respondTime = Debug.getRespondTime(source.bookSourceUrl) |
|
|
|
source.respondTime = Debug.getRespondTime(source.bookSourceUrl) |
|
|
|
appDb.bookSourceDao.update(source) |
|
|
|
appDb.bookSourceDao.update(source) |
|
|
|