diff --git a/app/src/main/java/io/legado/app/api/controller/BookController.kt b/app/src/main/java/io/legado/app/api/controller/BookController.kt index 0fc2f7c01..0a15c5ac3 100644 --- a/app/src/main/java/io/legado/app/api/controller/BookController.kt +++ b/app/src/main/java/io/legado/app/api/controller/BookController.kt @@ -46,6 +46,9 @@ object BookController { } } + /** + * 获取封面 + */ fun getCover(parameters: Map>): ReturnData { val returnData = ReturnData() val coverPath = parameters["path"]?.firstOrNull() @@ -155,6 +158,9 @@ object BookController { return returnData } + /** + * 保存书籍 + */ fun saveBook(postData: String?): ReturnData { val book = GSON.fromJsonObject(postData) val returnData = ReturnData() @@ -170,6 +176,9 @@ object BookController { return returnData.setErrorMsg("格式不对") } + /** + * 保存进度 + */ private fun saveBookReadIndex(book: Book, index: Int) { book.durChapterIndex = index book.durChapterTime = System.currentTimeMillis() @@ -186,6 +195,9 @@ object BookController { } } + /** + * 添加本地书籍 + */ fun addLocalBook(parameters: Map>): ReturnData { val returnData = ReturnData() try {