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

@ -21,14 +21,14 @@ import javax.script.SimpleBindings
@Parcelize
@Entity(
tableName = "book_sources",
indices = [(Index(value = ["bookSourceUrl"], unique = false))]
tableName = "book_sources",
indices = [(Index(value = ["bookSourceUrl"], unique = false))]
)
data class BookSource(
var bookSourceName: String = "", // 名称
var bookSourceGroup: String? = null, // 分组
@PrimaryKey
var bookSourceUrl: String = "", // 地址,包括 http/https
var bookSourceUrl: String = "", // 地址,包括 http/https
var bookSourceType: Int = 0, // 类型,0 文本,1 音频
var bookUrlPattern: String? = null,
var customOrder: Int = 0, // 手动排序编号
@ -78,8 +78,8 @@ data class BookSource(
AppConst.SCRIPT_ENGINE.eval(it.substring(4, it.lastIndexOf("<"))).toString()
else -> it
}
GSON.fromJsonObject<Map<String, String>>(header1)?.let { headers ->
headerMap.putAll(headers)
GSON.fromJsonObject<Map<String, String>>(header1)?.let { map ->
headerMap.putAll(map)
}
}
return headerMap

Loading…
Cancel
Save