优化
Some checks failed
Test Build / prepare (push) Has been cancelled
Test Build / build (app, release) (push) Has been cancelled
Test Build / build (app, releaseA) (push) Has been cancelled
Test Build / prerelease (push) Has been cancelled
Test Build / lanzou (push) Has been cancelled
Test Build / test_Branch (push) Has been cancelled
Test Build / telegram (push) Has been cancelled
update fork / build (push) Has been cancelled

This commit is contained in:
Horis
2025-04-19 16:58:45 +08:00
parent aa2485839e
commit e6966463bd

View File

@@ -61,7 +61,8 @@ object BookList {
body,
baseUrl,
ruleData.getVariable(),
isRedirect
isRedirect,
filter
)?.let { searchBook ->
searchBook.infoHtml = body
bookList.add(searchBook)
@@ -91,7 +92,7 @@ object BookList {
Debug.log(bookSource.bookSourceUrl, "└列表为空,按详情页解析")
getInfoItem(
bookSource, analyzeRule, analyzeUrl, body, baseUrl, ruleData.getVariable(),
isRedirect
isRedirect, filter
)?.let { searchBook ->
searchBook.infoHtml = body
bookList.add(searchBook)
@@ -148,7 +149,8 @@ object BookList {
body: String,
baseUrl: String,
variable: String?,
isRedirect: Boolean
isRedirect: Boolean,
filter: ((name: String, author: String) -> Boolean)?
): SearchBook? {
val book = Book(variable = variable)
book.bookUrl = if (isRedirect) {
@@ -170,6 +172,9 @@ object BookList {
baseUrl,
false
)
if (filter?.invoke(book.name, book.author) == false) {
return null
}
if (book.name.isNotBlank()) {
return book.toSearchBook()
}