This commit is contained in:
Horis
2025-02-03 15:55:01 +08:00
parent 5a25edeefb
commit a8f2e4762b
@@ -127,11 +127,14 @@ class AddToBookshelfDialog() : BaseDialogFragment(R.layout.dialog_add_to_bookshe
} }
} }
appDb.bookSourceDao.hasBookUrlPattern.forEach { source -> appDb.bookSourceDao.hasBookUrlPattern.forEach { source ->
try {
if (bookUrl.matches(source.bookUrlPattern!!.toRegex())) { if (bookUrl.matches(source.bookUrlPattern!!.toRegex())) {
getBookInfo(bookUrl, source)?.let { book -> getBookInfo(bookUrl, source)?.let { book ->
return@execute book return@execute book
} }
} }
} catch (_: Exception) {
}
} }
throw NoStackTraceException("未找到匹配书源") throw NoStackTraceException("未找到匹配书源")
}.onError { }.onError {