mirror of
https://github.com/gedoor/legado.git
synced 2024-09-01 09:34:25 +08:00
feat:添加文件类下载链接规则
This commit is contained in:
parent
a65d234325
commit
b44e0e76fe
@ -11,7 +11,7 @@
|
||||
: regex规则,不可省略,只可以用在书籍列表和目录列表
|
||||
```
|
||||
* 书源类型: 文件
|
||||
> 对于类似知轩藏书提供文件整合下载的网站,可以'在书源详情的目录URL规则获取文件链接,阅读会自动下载并导入
|
||||
> 对于类似知轩藏书提供文件整合下载的网站,可以'在书源详情的下载URL规则获取文件链接,支持多个链接,阅读会自动下载并导入
|
||||
|
||||
* CookieJar
|
||||
> 启用后会自动保存每次返回头中的Set-Cookie中的值,适用于验证码图片一类需要session的网站
|
||||
|
@ -16,5 +16,6 @@ data class BookInfoRule(
|
||||
var coverUrl: String? = null,
|
||||
var tocUrl: String? = null,
|
||||
var wordCount: String? = null,
|
||||
var canReName: String? = null
|
||||
var canReName: String? = null,
|
||||
var downloadUrls: String? = null
|
||||
) : Parcelable
|
@ -266,6 +266,7 @@ class BookSourceEditActivity :
|
||||
add(EditEntity("coverUrl", ir?.coverUrl, R.string.rule_cover_url))
|
||||
add(EditEntity("tocUrl", ir?.tocUrl, R.string.rule_toc_url))
|
||||
add(EditEntity("canReName", ir?.canReName, R.string.rule_can_re_name))
|
||||
add(EditEntity("downloadUrls", ir?.downloadUrls, R.string.download_url_rule))
|
||||
}
|
||||
//目录页
|
||||
val tr = source?.getTocRule()
|
||||
@ -396,6 +397,7 @@ class BookSourceEditActivity :
|
||||
"tocUrl" -> bookInfoRule.tocUrl =
|
||||
viewModel.ruleComplete(it.value, bookInfoRule.init, 2)
|
||||
"canReName" -> bookInfoRule.canReName = it.value
|
||||
"downloadUrls" -> bookInfoRule.downloadUrls = viewModel.ruleComplete(it.value, bookInfoRule.init)
|
||||
}
|
||||
}
|
||||
tocEntities.forEach {
|
||||
|
Loading…
Reference in New Issue
Block a user