mirror of
https://github.com/gedoor/legado.git
synced 2024-09-03 09:55:00 +08:00
编码bookurl
This commit is contained in:
parent
f5a05a2973
commit
cd03d6fd1e
@ -72,7 +72,7 @@ object BookController {
|
||||
val returnData = ReturnData()
|
||||
val bookUrl = parameters["url"]?.firstOrNull()
|
||||
?: return returnData.setErrorMsg("bookUrl为空")
|
||||
val book = appDb.bookDao.getBook(bookUrl)
|
||||
val book = appDb.bookDao.getBook(URLDecoder.decode(bookUrl, "UTF-8"))
|
||||
?: return returnData.setErrorMsg("bookUrl不对")
|
||||
val src = URLDecoder.decode(parameters["path"]?.firstOrNull(), "UTF-8")
|
||||
val vFile = BookHelp.getImage(book, src)
|
||||
@ -82,7 +82,9 @@ object BookController {
|
||||
BookHelp.saveImage(bookSource, book, src)
|
||||
}
|
||||
}
|
||||
return returnData.setData(vFile.readBytes())
|
||||
return returnData.setData(
|
||||
BitmapUtils.decodeBitmap(vFile.absolutePath)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user