|
|
@ -4,8 +4,6 @@ import android.graphics.Bitmap |
|
|
|
import android.graphics.BitmapFactory |
|
|
|
import android.graphics.BitmapFactory |
|
|
|
import android.net.Uri |
|
|
|
import android.net.Uri |
|
|
|
import android.text.TextUtils |
|
|
|
import android.text.TextUtils |
|
|
|
import android.util.Log |
|
|
|
|
|
|
|
import io.legado.app.data.appDb |
|
|
|
|
|
|
|
import io.legado.app.data.entities.Book |
|
|
|
import io.legado.app.data.entities.Book |
|
|
|
import io.legado.app.data.entities.BookChapter |
|
|
|
import io.legado.app.data.entities.BookChapter |
|
|
|
import io.legado.app.utils.* |
|
|
|
import io.legado.app.utils.* |
|
|
@ -132,10 +130,7 @@ class EpubFile(var book: Book) { |
|
|
|
private fun getContent(chapter: BookChapter): String? { |
|
|
|
private fun getContent(chapter: BookChapter): String? { |
|
|
|
/*获取当前章节文本*/ |
|
|
|
/*获取当前章节文本*/ |
|
|
|
var string = getChildChapter(chapter, chapter.url) |
|
|
|
var string = getChildChapter(chapter, chapter.url) |
|
|
|
val childContends = appDb.epubChapterDao.get(book.bookUrl, chapter.url) |
|
|
|
|
|
|
|
childContends.forEach { |
|
|
|
|
|
|
|
string += "\n" + getChildChapter(chapter, it.href) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return string |
|
|
|
return string |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|