From 950afc36d7fe3d3ca31a44a62928f9e1d13778e4 Mon Sep 17 00:00:00 2001 From: ag2s20150909 Date: Fri, 2 Jul 2021 15:03:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Umd=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/libs/umdlib-debug.aar | Bin 18056 -> 0 bytes .../java/io/legado/app/data/entities/Book.kt | 3 ++ .../main/java/io/legado/app/help/BookHelp.kt | 4 +-- .../legado/app/model/localBook/LocalBook.kt | 7 ++++- .../io/legado/app/model/localBook/UmdFile.kt | 9 +++--- .../app/ui/book/local/ImportBookActivity.kt | 2 ++ .../me/ag2s/umdlib/domain/UmdChapters.java | 18 +++-------- .../java/me/ag2s/umdlib/umd/UmdReader.java | 29 ++++++++---------- 8 files changed, 35 insertions(+), 37 deletions(-) delete mode 100644 app/libs/umdlib-debug.aar diff --git a/app/libs/umdlib-debug.aar b/app/libs/umdlib-debug.aar deleted file mode 100644 index 1f8be1b3baf7310655590eaa916de25cf9a1a397..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18056 zcmZ^JL$EGPu;h1a+qP}rWBVT4wr$(CZQHhO+qm<`tY#wKi>Rz#RBp0*m7T314FU=c z06;Z_`GmgIkSuUU5yjDFOM8l}#4k8DNO4X71c6$Nr^oJg#KWOx0 z(WXoA;ww_ws(+`eM`RlS9^zXCx1J2|V^I*UqP}@5o*wG}zRG^~LI$E}4vWugN#Ql! zFb{l~X6AQO`r=1*x$oIlvcRJ~PiDvx&2b}`Q7OGz@8VP#4V9ZWbq}UV#FxYr!?>isY{PHjZ+FPhtokNMM##kZcj;k`d_V4aOl|OV@ z$0nZzp?#ab*h{d{&)%&q3!T4#sPYGE&SR1OJxLeergKox`3jDY|3WPScva3Y5dr?} zpa8&v-`Mi{>}daBs@%xv-}%|uO92B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pLWt@yjMYkPTZ@zI3s4*S?>Oi7(_5A8m75 zFuP-4h*aVu=E5W~zvLF>TV63OmEx+MG1I&ARDK;&X_>gF>xf>kleuv1EXl-YIi*Qz zb1$BCmVfIqV|tRusT=CMcD^{w&r!VfY=>kI$A`33=9SNxoPrnZY@h3BgLd|ag-n=_ zD)8hDJs`FOVqez~M_o@pH~r-NT>V7I86)~hrI|S?`sqc9DLJY7iHSwJxv3?IDTyVC zdcb2%3Q~(oGE!0$~;q=zkI(O#$X45Oi51xAY=zQ|k_4M)7@pKVn2incZ zB*KjQloX%?z+g!uh(bOy1)omPnJF-^q)`XR1fQUSt_A%B6@->RAQQ`ZD(D8FpH_k} nK#dXQ>=Ja1=z)yTxWa{kAP?|n1@4z;U| { return if (book.isEpub()) { EpubFile.getChapterList(book) + }else if(book.isUmd()){ + UmdFile.getChapterList(book) } else { AnalyzeTxtFile().analyze(book) } @@ -36,6 +38,8 @@ object LocalBook { fun getContext(book: Book, chapter: BookChapter): String? { return if (book.isEpub()) { EpubFile.getContent(book, chapter) + }else if (book.isUmd()){ + UmdFile.getContent(book, chapter) } else { AnalyzeTxtFile.getContent(book, chapter) } @@ -121,13 +125,14 @@ object LocalBook { ) ) if (book.isEpub()) EpubFile.upBookInfo(book) + if (book.isUmd()) UmdFile.upBookInfo(book) appDb.bookDao.insert(book) return book } fun deleteBook(book: Book, deleteOriginal: Boolean) { kotlin.runCatching { - if (book.isLocalTxt()) { + if (book.isLocalTxt()||book.isUmd()) { val bookFile = FileUtils.getFile(cacheFolder, book.originName) bookFile.delete() } diff --git a/app/src/main/java/io/legado/app/model/localBook/UmdFile.kt b/app/src/main/java/io/legado/app/model/localBook/UmdFile.kt index bfdf3655f..394072085 100644 --- a/app/src/main/java/io/legado/app/model/localBook/UmdFile.kt +++ b/app/src/main/java/io/legado/app/model/localBook/UmdFile.kt @@ -1,6 +1,7 @@ package io.legado.app.model.localBook import android.net.Uri +import android.util.Log import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookChapter @@ -21,12 +22,9 @@ class UmdFile(var book: Book) { @Synchronized private fun getEFile(book: Book): UmdFile { - //BookHelp.getEpubFile(book) if (eFile == null || eFile?.book?.bookUrl != book.bookUrl) { eFile = UmdFile(book) - //对于Epub文件默认不启用替换 - //book.setUseReplaceRule(false) return eFile!! } eFile?.book = book @@ -112,7 +110,7 @@ class UmdFile(var book: Book) { } } private fun getContent(chapter: BookChapter): String? { - return umdBook?.chapters?.getContentString(chapter.index) + return umdBook?.chapters?.getContentString(chapter.index) } private fun getChapterList(): ArrayList { @@ -124,8 +122,11 @@ class UmdFile(var book: Book) { chapter.index = index chapter.bookUrl = book.bookUrl chapter.url = index.toString(); + Log.d("UMD",chapter.url) chapterList.add(chapter) } + book.latestChapterTitle = chapterList.lastOrNull()?.title + book.totalChapterNum = chapterList.size return chapterList } diff --git a/app/src/main/java/io/legado/app/ui/book/local/ImportBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/local/ImportBookActivity.kt index 0bb66218d..5d45d4795 100644 --- a/app/src/main/java/io/legado/app/ui/book/local/ImportBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/local/ImportBookActivity.kt @@ -197,6 +197,7 @@ class ImportBookActivity : VMBaseActivity titles = new ArrayList(); - public List contentLengths = new ArrayList(); + private List titles = new ArrayList<>(); + public List contentLengths = new ArrayList<>(); public ByteArrayOutputStream contents = new ByteArrayOutputStream(); public void addTitle(String s){ @@ -44,7 +44,7 @@ public class UmdChapters { return contentLengths.get(index); } - public byte[] getContent(int index) throws Exception { + public byte[] getContent(int index) { int st=contentLengths.get(index); byte[] b=contents.toByteArray(); int end=index+1 _ZippedContentList = new ArrayList<>(); -// public UmdReader(InputStream inputStream) { -// this.inputStream = inputStream; -// } -// public UmdReader(File file) throws IOException { -// this.inputStream = new FileInputStream(file); -// } + public synchronized UmdBook read(InputStream inputStream) throws Exception { - public UmdBook read(InputStream inputStream) throws Exception { book = new UmdBook(); + this.inputStream=inputStream; StreamReader reader = new StreamReader(inputStream); UmdHeader umdHeader = new UmdHeader(); book.setHeader(umdHeader); @@ -61,7 +61,7 @@ public class UmdReader { num1 = segType; } - //System.out.println(book.getHeader().toString()); + System.out.println(book.getHeader().toString()); return book; } @@ -97,7 +97,6 @@ public class UmdReader { System.out.println(length); book.getChapters().contents.write(UmdUtils.decompress(reader.readBytes(length))); book.getChapters().contents.flush(); - //this._ZippedContentList.add(reader.readBytes(length)); break; } else { for (int i = 0; i < book.getNum(); i++) { @@ -214,10 +213,6 @@ public class UmdReader { } - - - - @Override public String toString() { return "UmdReader{" +