图片相对地址转绝对地址

pull/890/head
gedoor 4 years ago
parent ef52917604
commit df19399507
  1. 7
      app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt

@ -96,7 +96,7 @@ object ChapterProvider {
val matcher = AppPattern.imgPattern.matcher(text)
while (matcher.find()) {
matcher.group(1)?.let { it ->
val src = NetworkUtils.getAbsoluteURL(bookChapter.url, it)
val src = NetworkUtils.getAbsoluteURL(bookChapter.getAbsoluteURL(), it)
srcList.add(src)
ImageProvider.getImage(book, bookChapter.index, src)
matcher.appendReplacement(sb, srcReplaceChar)
@ -120,7 +120,10 @@ object ChapterProvider {
if (matcher.find()) {
matcher.group(1)?.let { it ->
if (!book.isEpub()) {
val src = NetworkUtils.getAbsoluteURL(bookChapter.url, it)
val src = NetworkUtils.getAbsoluteURL(
bookChapter.getAbsoluteURL(),
it
)
durY = setTypeImage(
book, bookChapter, src,
durY, textPages, book.getImageStyle()

Loading…
Cancel
Save