mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -12,6 +12,7 @@ import io.legado.app.data.entities.Book
|
||||
import io.legado.app.data.entities.BookChapter
|
||||
import io.legado.app.data.entities.BookSource
|
||||
import io.legado.app.data.entities.RssArticle
|
||||
import io.legado.app.exception.NoStackTraceException
|
||||
import io.legado.app.help.CacheManager
|
||||
import io.legado.app.help.JsExtensions
|
||||
import io.legado.app.help.http.CookieStore
|
||||
@@ -816,7 +817,7 @@ class AnalyzeRule(
|
||||
* 重新获取book
|
||||
*/
|
||||
fun reGetBook() {
|
||||
if (!preUpdateJs) return
|
||||
if (!preUpdateJs) throw NoStackTraceException("只能在 preUpdateJs 中调用")
|
||||
val bookSource = source as? BookSource
|
||||
val book = book as? Book
|
||||
if (bookSource == null || book == null) return
|
||||
@@ -838,7 +839,7 @@ class AnalyzeRule(
|
||||
* 更新tocUrl,有些书源目录url定期更新,可以在js调用更新
|
||||
*/
|
||||
fun refreshTocUrl() {
|
||||
if (!preUpdateJs) return
|
||||
if (!preUpdateJs) throw NoStackTraceException("只能在 preUpdateJs 中调用")
|
||||
val bookSource = source as? BookSource
|
||||
val book = book as? Book
|
||||
if (bookSource == null || book == null) return
|
||||
|
||||
Reference in New Issue
Block a user