删除无用代码

pull/1673/head
kunfei 3 years ago
parent db1ad43821
commit 7816385002
  1. 14
      app/src/main/java/io/legado/app/api/controller/BookController.kt
  2. 1
      app/src/main/java/io/legado/app/web/HttpServer.kt

@ -309,18 +309,4 @@ object BookController {
return returnData.setData(data) 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() "/getReadConfig" -> BookController.getWebReadConfig()
"/getRssSource" -> RssSourceController.getSource(parameters) "/getRssSource" -> RssSourceController.getSource(parameters)
"/getRssSources" -> RssSourceController.sources "/getRssSources" -> RssSourceController.sources
"/getImage" -> BookController.getImage(parameters)
else -> null else -> null
} }
} }

Loading…
Cancel
Save