mirror of
https://github.com/gedoor/legado.git
synced 2024-09-03 09:55:00 +08:00
删除无用代码
This commit is contained in:
parent
db1ad43821
commit
7816385002
@ -309,18 +309,4 @@ object BookController {
|
||||
return returnData.setData(data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取图片
|
||||
*/
|
||||
fun getImage(parameters: Map<String, List<String>>): ReturnData {
|
||||
val returnData = ReturnData()
|
||||
val coverPath = parameters["path"]?.firstOrNull()
|
||||
val ftBitmap = ImageLoader.loadBitmap(appCtx, coverPath).submit()
|
||||
return try {
|
||||
returnData.setData(ftBitmap.get())
|
||||
} catch (e: Exception) {
|
||||
returnData.setData(BookCover.defaultDrawable.toBitmap())
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -65,7 +65,6 @@ class HttpServer(port: Int) : NanoHTTPD(port) {
|
||||
"/getReadConfig" -> BookController.getWebReadConfig()
|
||||
"/getRssSource" -> RssSourceController.getSource(parameters)
|
||||
"/getRssSources" -> RssSourceController.sources
|
||||
"/getImage" -> BookController.getImage(parameters)
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user