pull/1319/head
gedoor 3 years ago
parent f64bbf01d9
commit c834549410
  1. 8
      app/src/main/java/io/legado/app/service/CheckSourceService.kt
  2. 5
      app/src/main/java/io/legado/app/ui/book/source/debug/BookSourceDebugActivity.kt

@ -111,7 +111,13 @@ class CheckSourceService : BaseService() {
fun check(source: BookSource) {
execute(context = searchCoroutine) {
Debug.startChecking(source)
var books = WebBook.searchBookAwait(this, source, CheckSource.keyword)
var searchWord = CheckSource.keyword
source.ruleSearch?.checkKeyWord?.let {
if (it.isNotBlank()) {
searchWord = it
}
}
var books = WebBook.searchBookAwait(this, source, searchWord)
if (books.isEmpty()) {
val exs = source.exploreKinds
var url: String? = null

@ -80,6 +80,11 @@ class BookSourceDebugActivity : VMBaseActivity<ActivitySourceDebugBinding, BookS
@SuppressLint("SetTextI18n")
private fun initHelpView() {
viewModel.bookSource?.ruleSearch?.checkKeyWord?.let {
if (it.isNotBlank()) {
binding.textMy.text = it
}
}
viewModel.bookSource?.exploreKinds?.firstOrNull {
!it.url.isNullOrBlank()
}?.let {

Loading…
Cancel
Save