pull/375/head 3.20.091317
gedoor 4 years ago
parent 6b8e92ea8a
commit f8572d2a42
  1. 2
      app/src/main/java/io/legado/app/model/webBook/BookContent.kt
  2. 1
      app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt

@ -97,7 +97,7 @@ object BookContent {
val replaceRegex = bookSource.ruleContent?.replaceRegex
if (!replaceRegex.isNullOrEmpty()) {
val analyzeRule = AnalyzeRule(book)
analyzeRule.setContent(body, baseUrl)
analyzeRule.setContent(contentStr, baseUrl)
analyzeRule.chapter = bookChapter
contentStr = analyzeRule.getString(replaceRegex)
}

@ -160,6 +160,7 @@ class ReadRssActivity : VMBaseActivity<ReadRssViewModel>(R.layout.activity_rss_r
request.setAllowedOverRoaming(true)
// 允许下载的网路类型
request.setAllowedNetworkTypes(DownloadManager.Request.NETWORK_WIFI)
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE)
// 设置下载文件保存的路径和文件名
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, fileName)
val downloadManager = getSystemService(DOWNLOAD_SERVICE) as DownloadManager

Loading…
Cancel
Save