This commit is contained in:
Horis committed 2025-02-03 15:55:01 +08:00
1 parent 5bd3bd8d15
commit add5883246
1 file changed
+3
@@ -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 {