pull/1128/head
bushixuanqi 3 years ago
parent 4587231037
commit 1715fcdabd
  1. 2
      app/src/main/java/io/legado/app/data/entities/BookChapter.kt
  2. 2
      app/src/main/java/io/legado/app/utils/HtmlFormatter.kt

@ -66,7 +66,7 @@ data class BookChapter(
val urlMatcher = AnalyzeUrl.paramPattern.matcher(url)
val urlBefore = if(urlMatcher.find())url.substring(0,urlMatcher.start()) else url
val urlAbsoluteBefore = NetworkUtils.getAbsoluteURL(baseUrl,urlBefore)
return if(urlBefore.length == url.length) urlAbsoluteBefore else urlAbsoluteBefore + url.substring(urlMatcher.end())
return if(urlBefore.length == url.length) urlAbsoluteBefore else urlAbsoluteBefore + ',' + url.substring(urlMatcher.end())
}
fun getFileName(): String = String.format("%05d-%s.nb", index, MD5Utils.md5Encode16(title))

@ -67,7 +67,7 @@ object HtmlFormatter {
val urlMatcher = AnalyzeUrl.paramPattern.matcher(url)
val find = urlMatcher.find()
sb.append("<img src=\"${
if(find) NetworkUtils.getAbsoluteURL(redirectUrl,url.substring(0,urlMatcher.start()))+','+ url.substring(urlMatcher.end())
if(find) NetworkUtils.getAbsoluteURL(redirectUrl,url.substring(0,urlMatcher.start())) + ',' + url.substring(urlMatcher.end())
else url
}\">")

Loading…
Cancel
Save