优化
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.BookChapter
|
||||||
import io.legado.app.data.entities.BookSource
|
import io.legado.app.data.entities.BookSource
|
||||||
import io.legado.app.data.entities.RssArticle
|
import io.legado.app.data.entities.RssArticle
|
||||||
|
import io.legado.app.exception.NoStackTraceException
|
||||||
import io.legado.app.help.CacheManager
|
import io.legado.app.help.CacheManager
|
||||||
import io.legado.app.help.JsExtensions
|
import io.legado.app.help.JsExtensions
|
||||||
import io.legado.app.help.http.CookieStore
|
import io.legado.app.help.http.CookieStore
|
||||||
@@ -816,7 +817,7 @@ class AnalyzeRule(
|
|||||||
* 重新获取book
|
* 重新获取book
|
||||||
*/
|
*/
|
||||||
fun reGetBook() {
|
fun reGetBook() {
|
||||||
if (!preUpdateJs) return
|
if (!preUpdateJs) throw NoStackTraceException("只能在 preUpdateJs 中调用")
|
||||||
val bookSource = source as? BookSource
|
val bookSource = source as? BookSource
|
||||||
val book = book as? Book
|
val book = book as? Book
|
||||||
if (bookSource == null || book == null) return
|
if (bookSource == null || book == null) return
|
||||||
@@ -838,7 +839,7 @@ class AnalyzeRule(
|
|||||||
* 更新tocUrl,有些书源目录url定期更新,可以在js调用更新
|
* 更新tocUrl,有些书源目录url定期更新,可以在js调用更新
|
||||||
*/
|
*/
|
||||||
fun refreshTocUrl() {
|
fun refreshTocUrl() {
|
||||||
if (!preUpdateJs) return
|
if (!preUpdateJs) throw NoStackTraceException("只能在 preUpdateJs 中调用")
|
||||||
val bookSource = source as? BookSource
|
val bookSource = source as? BookSource
|
||||||
val book = book as? Book
|
val book = book as? Book
|
||||||
if (bookSource == null || book == null) return
|
if (bookSource == null || book == null) return
|
||||||
|
|||||||
Reference in New Issue
Block a user