pull/38/head
kunfei 5 years ago
parent 52e4d43191
commit 3be66e388a
  1. 2
      app/src/main/java/io/legado/app/data/entities/BookSource.kt

@ -66,6 +66,7 @@ data class BookSource(
@IgnoredOnParcel @IgnoredOnParcel
var contentRuleV: ContentRule? = null var contentRuleV: ContentRule? = null
@Throws(Exception::class)
fun getHeaderMap(): Map<String, String> { fun getHeaderMap(): Map<String, String> {
val headerMap = HashMap<String, String>() val headerMap = HashMap<String, String>()
headerMap["User-Agent"] = App.INSTANCE.getPrefString("user_agent") ?: userAgent headerMap["User-Agent"] = App.INSTANCE.getPrefString("user_agent") ?: userAgent
@ -84,7 +85,6 @@ data class BookSource(
return headerMap return headerMap
} }
fun getSearchRule(): SearchRule { fun getSearchRule(): SearchRule {
searchRuleV ?: let { searchRuleV ?: let {
searchRuleV = GSON.fromJsonObject<SearchRule>(ruleSearch) searchRuleV = GSON.fromJsonObject<SearchRule>(ruleSearch)

Loading…
Cancel
Save