diff --git a/app/src/main/java/io/legado/app/data/entities/BookChapter.kt b/app/src/main/java/io/legado/app/data/entities/BookChapter.kt index b88151e5d..8fa130d31 100644 --- a/app/src/main/java/io/legado/app/data/entities/BookChapter.kt +++ b/app/src/main/java/io/legado/app/data/entities/BookChapter.kt @@ -54,5 +54,8 @@ data class BookChapter( variable = GSON.toJson(variableMap) } + fun getVariableValue(book: Book, key: String): String? { + return variableMap?.get(key) ?: book.variableMap?.get(key) + } }