导出epub时使用实际显示的信息代替书源获取的信息

pull/935/head
ag2s20150909 4 years ago
parent 1a56e0a846
commit 4bb64695a8
  1. 4
      app/src/main/java/io/legado/app/ui/book/cache/CacheViewModel.kt

@ -217,7 +217,7 @@ class CacheViewModel(application: Application) : BaseViewModel(application) {
Glide.with(context) Glide.with(context)
.asBitmap() .asBitmap()
.load(book.coverUrl) .load(book.getDisplayCover())
.into(object : CustomTarget<Bitmap>() { .into(object : CustomTarget<Bitmap>() {
override fun onResourceReady(resource: Bitmap, transition: Transition<in Bitmap>?) { override fun onResourceReady(resource: Bitmap, transition: Transition<in Bitmap>?) {
val stream = ByteArrayOutputStream() val stream = ByteArrayOutputStream()
@ -290,7 +290,7 @@ class CacheViewModel(application: Application) : BaseViewModel(application) {
private fun setEpubMetadata(book: Book, epubBook: EpubBook) { private fun setEpubMetadata(book: Book, epubBook: EpubBook) {
val metadata = Metadata() val metadata = Metadata()
metadata.titles.add(book.name)//书籍的名称 metadata.titles.add(book.name)//书籍的名称
metadata.authors.add(Author(book.author))//书籍的作者 metadata.authors.add(Author(book.getRealAuthor()))//书籍的作者
metadata.language = "zh"//数据的语言 metadata.language = "zh"//数据的语言
metadata.dates.add(Date())//数据的创建日期 metadata.dates.add(Date())//数据的创建日期
metadata.publishers.add("Legado APP")//数据的创建者 metadata.publishers.add("Legado APP")//数据的创建者

Loading…
Cancel
Save