From 544f07737b7075c6c64cf98516b475a5d46fdaa8 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 4 Nov 2019 20:21:55 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/help/BookHelp.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/help/BookHelp.kt b/app/src/main/java/io/legado/app/help/BookHelp.kt index 33b3edaea..022113231 100644 --- a/app/src/main/java/io/legado/app/help/BookHelp.kt +++ b/app/src/main/java/io/legado/app/help/BookHelp.kt @@ -5,6 +5,7 @@ import io.legado.app.constant.PreferKey import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookChapter import io.legado.app.data.entities.ReplaceRule +import io.legado.app.utils.MD5Utils import io.legado.app.utils.getPrefInt import io.legado.app.utils.getPrefString import org.apache.commons.text.similarity.JaccardSimilarity @@ -67,7 +68,7 @@ object BookHelp { private fun getChapterPath(book: Book, bookChapter: BookChapter): String { val bookFolder = formatFolderName(book.name + book.bookUrl) val chapterFile = - String.format("%05d-%s", bookChapter.index, formatFolderName(bookChapter.title)) + String.format("%05d-%s", bookChapter.index, MD5Utils.md5Encode(bookChapter.title)) return "$downloadPath${File.separator}book_cache${File.separator}$bookFolder${File.separator}$chapterFile.nb" }