pull/540/head
gedoor 4 years ago
parent 690cd9b083
commit 79ddeec20d
  1. 8
      app/src/main/java/io/legado/app/help/BookHelp.kt

@ -68,16 +68,16 @@ object BookHelp {
content.split("\n").forEach { content.split("\n").forEach {
val matcher = AppPattern.imgPattern.matcher(it) val matcher = AppPattern.imgPattern.matcher(it)
if (matcher.find()) { if (matcher.find()) {
var src = matcher.group(1) matcher.group(1)?.let { src ->
src = NetworkUtils.getAbsoluteURL(bookChapter.url, src) val mSrc = NetworkUtils.getAbsoluteURL(bookChapter.url, src)
src?.let { saveImage(book, mSrc)
saveImage(book, src)
} }
} }
} }
postEvent(EventBus.SAVE_CONTENT, bookChapter) postEvent(EventBus.SAVE_CONTENT, bookChapter)
} }
@Suppress("unused")
fun saveFont(book: Book, bookChapter: BookChapter, font: ByteArray) { fun saveFont(book: Book, bookChapter: BookChapter, font: ByteArray) {
FileUtils.createFileIfNotExist( FileUtils.createFileIfNotExist(
downloadDir, downloadDir,

Loading…
Cancel
Save