From 8828bcbdb53dd28fa63f03f206201817403309eb Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 20 Sep 2022 17:12:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/help/source/BookSourceExtensions.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/source/BookSourceExtensions.kt b/app/src/main/java/io/legado/app/help/source/BookSourceExtensions.kt index 63feac15a..263af2d83 100644 --- a/app/src/main/java/io/legado/app/help/source/BookSourceExtensions.kt +++ b/app/src/main/java/io/legado/app/help/source/BookSourceExtensions.kt @@ -32,14 +32,14 @@ suspend fun BookSource.exploreKinds(): List { mutex.withLock { exploreKindsMap[exploreKindsKey]?.let { return it } val kinds = arrayListOf() - var ruleStr: String = exploreUrl withContext(Dispatchers.IO) { kotlin.runCatching { + var ruleStr = exploreUrl if (exploreUrl.startsWith("", false) || exploreUrl.startsWith("@js:", false) ) { - ruleStr = aCache.getAsString(bookSourceUrl) ?: "" - if (ruleStr.isBlank()) { + ruleStr = aCache.getAsString(exploreKindsKey) + if (ruleStr.isNullOrBlank()) { val jsStr = if (exploreUrl.startsWith("@")) { exploreUrl.substring(4) } else {