pull/1931/head
kunfei 3 years ago
parent 5286384e7a
commit 1fbcc92daf
  1. 4
      app/src/main/assets/updateLog.md
  2. 4
      app/src/main/java/io/legado/app/data/entities/BookSource.kt
  3. 3
      app/src/main/java/io/legado/app/data/entities/rule/BookInfoRule.kt
  4. 9
      app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt
  5. 2
      app/src/main/java/io/legado/app/ui/main/MainViewModel.kt
  6. 1
      app/src/main/res/values-es-rES/strings.xml
  7. 1
      app/src/main/res/values-ja-rJP/strings.xml
  8. 1
      app/src/main/res/values-pt-rBR/strings.xml
  9. 1
      app/src/main/res/values-zh-rHK/strings.xml
  10. 1
      app/src/main/res/values-zh-rTW/strings.xml
  11. 1
      app/src/main/res/values-zh/strings.xml
  12. 1
      app/src/main/res/values/strings.xml

@ -11,6 +11,10 @@
* 正文出现缺字漏字、内容缺失、排版错乱等情况,有可能是净化规则或简繁转换出现问题。
* 漫画源看书显示乱码,**阅读与其他软件的源并不通用**,请导入阅读的支持的漫画源!
**2022/05/27**
* 书源添加刷新时重新获取目录页链接Url的配置
**2022/05/26**
* 修复部分txt章节结尾乱码bug

@ -143,6 +143,10 @@ data class BookSource(
fun getContentRule() = ruleContent ?: ContentRule()
fun isReGetTocUrlOnRefresh(): Boolean {
return ruleBookInfo?.reGetTocUrlOnRefresh.isTrue()
}
fun getDisPlayNameGroup(): String {
return if (bookSourceGroup.isNullOrBlank()) {
bookSourceName

@ -17,5 +17,6 @@ data class BookInfoRule(
var tocUrl: String? = null,
var wordCount: String? = null,
var canReName: String? = null,
var downloadUrls: String? = null
var downloadUrls: String? = null,
var reGetTocUrlOnRefresh: String? = null
) : Parcelable

@ -217,7 +217,9 @@ class BookSourceEditActivity :
add(EditEntity("header", source?.header, R.string.source_http_header))
add(
EditEntity(
"concurrentRate", source?.concurrentRate, R.string.source_concurrent_rate
"concurrentRate",
source?.concurrentRate,
R.string.source_concurrent_rate
)
)
}
@ -267,6 +269,7 @@ class BookSourceEditActivity :
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))
add(EditEntity("reGetTocUrl", ir?.reGetTocUrlOnRefresh, R.string.rule_re_get_toc_url))
}
//目录页
val tr = source?.getTocRule()
@ -397,7 +400,9 @@ 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)
"downloadUrls" -> bookInfoRule.downloadUrls =
viewModel.ruleComplete(it.value, bookInfoRule.init)
"reGetTocUrl" -> bookInfoRule.reGetTocUrlOnRefresh = it.value
}
}
tocEntities.forEach {

@ -116,7 +116,7 @@ class MainViewModel(application: Application) : BaseViewModel(application) {
onUpTocBooks.add(book.bookUrl)
postEvent(EventBus.UP_BOOKSHELF, book.bookUrl)
execute(context = upTocPool) {
if (book.tocUrl.isBlank()) {
if (book.tocUrl.isBlank() || source.isReGetTocUrlOnRefresh()) {
WebBook.getBookInfoAwait(this, source, book)
}
val toc = WebBook.getChapterListAwait(this, source, book).getOrThrow()

@ -416,6 +416,7 @@
<string name="rule_is_volume">Volume mark(isVolume)</string>
<string name="rule_is_vip">VIP标识(isVip)</string>
<string name="rule_update_time">更新时间(ChapterInfo)</string>
<string name="rule_re_get_toc_url">刷新时重新获取目录Url(reGetTocUrlOnRefresh)</string>
<string name="rule_book_content">正文规则(content)</string>
<string name="rule_next_content">正文下一页URL规则(nextContentUrl)</string>
<string name="rule_web_js">WebViewJs(webJs)</string>

@ -420,6 +420,7 @@
<string name="rule_is_volume">Volume mark(isVolume)</string>
<string name="rule_is_vip">VIP标识(isVip)</string>
<string name="rule_update_time">更新时间(ChapterInfo)</string>
<string name="rule_re_get_toc_url">刷新时重新获取目录Url(reGetTocUrlOnRefresh)</string>
<string name="rule_book_content">正文规则(content)</string>
<string name="rule_next_content">正文下一页URL规则(nextContentUrl)</string>
<string name="rule_web_js">WebViewJs(webJs)</string>

@ -418,6 +418,7 @@
<string name="rule_is_volume">卷标识(isVolume)</string>
<string name="rule_is_vip">VIP标识(éVip)</string>
<string name="rule_update_time">更新时间(capítuloInfo)</string>
<string name="rule_re_get_toc_url">刷新时重新获取目录Url(reGetTocUrlOnRefresh)</string>
<string name="rule_book_content">正文规则(conteúdo)</string>
<string name="rule_next_content">正文下一页URL规则(proxConteúdoUrl)</string>
<string name="rule_web_js">WebViewJs(webJs)</string>

@ -415,6 +415,7 @@
<string name="rule_is_volume">Volume標識(isVolume)</string>
<string name="rule_is_vip">VIP 標識 (isVip)</string>
<string name="rule_update_time">更新時間 (ChapterInfo)</string>
<string name="rule_re_get_toc_url">刷新时重新获取目录Url(reGetTocUrlOnRefresh)</string>
<string name="rule_book_content">正文規則 (content)</string>
<string name="rule_next_content">正文下一頁 URL 規則 (nextContentUrl)</string>
<string name="rule_web_js">WebViewJs (webJs)</string>

@ -419,6 +419,7 @@
<string name="rule_is_volume">Volume標識(isVolume)</string>
<string name="rule_is_vip">VIP標識(isVip)</string>
<string name="rule_update_time">更新時間(ChapterInfo)</string>
<string name="rule_re_get_toc_url">刷新时重新获取目录Url(reGetTocUrlOnRefresh)</string>
<string name="rule_book_content">正文規則(content)</string>
<string name="rule_next_content">正文下一頁URL規則(nextContentUrl)</string>
<string name="rule_web_js">WebViewJs(webJs)</string>

@ -419,6 +419,7 @@
<string name="rule_is_volume">Volume标识(isVolume)</string>
<string name="rule_is_vip">VIP标识(isVip)</string>
<string name="rule_update_time">更新时间(ChapterInfo)</string>
<string name="rule_re_get_toc_url">刷新时重新获取目录Url(reGetTocUrlOnRefresh)</string>
<string name="rule_book_content">正文规则(content)</string>
<string name="rule_next_content">正文下一页URL规则(nextContentUrl)</string>
<string name="rule_web_js">WebViewJs(webJs)</string>

@ -420,6 +420,7 @@
<string name="rule_is_volume">卷标识(isVolume)</string>
<string name="rule_is_vip">VIP标识(isVip)</string>
<string name="rule_update_time">更新时间(ChapterInfo)</string>
<string name="rule_re_get_toc_url">刷新时重新获取目录Url(reGetTocUrlOnRefresh)</string>
<string name="rule_book_content">正文规则(content)</string>
<string name="rule_next_content">正文下一页URL规则(nextContentUrl)</string>
<string name="rule_web_js">WebViewJs(webJs)</string>

Loading…
Cancel
Save