mirror of
https://github.com/samsonjs/immich.git
synced 2026-04-27 15:07:45 +00:00
fix: use edited thumbs for widgets (#25550)
* fix(server): enforce crop is the first action * chore: test * fix: use edited thumbs for widgets --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
parent
e04d316203
commit
da590995ab
2 changed files with 2 additions and 2 deletions
|
|
@ -101,7 +101,7 @@ class ImmichAPI(cfg: ServerConfig) {
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun fetchImage(asset: Asset): Bitmap = withContext(Dispatchers.IO) {
|
suspend fun fetchImage(asset: Asset): Bitmap = withContext(Dispatchers.IO) {
|
||||||
val url = buildRequestURL("/assets/${asset.id}/thumbnail", listOf("size" to "preview"))
|
val url = buildRequestURL("/assets/${asset.id}/thumbnail", listOf("size" to "preview", "edited" to "true"))
|
||||||
val connection = url.openConnection()
|
val connection = url.openConnection()
|
||||||
val data = connection.getInputStream().readBytes()
|
val data = connection.getInputStream().readBytes()
|
||||||
BitmapFactory.decodeByteArray(data, 0, data.size)
|
BitmapFactory.decodeByteArray(data, 0, data.size)
|
||||||
|
|
|
||||||
|
|
@ -225,7 +225,7 @@ class ImmichAPI {
|
||||||
}
|
}
|
||||||
|
|
||||||
func fetchImage(asset: Asset) async throws(FetchError) -> UIImage {
|
func fetchImage(asset: Asset) async throws(FetchError) -> UIImage {
|
||||||
let thumbnailParams = [URLQueryItem(name: "size", value: "preview")]
|
let thumbnailParams = [URLQueryItem(name: "size", value: "preview"), URLQueryItem(name: "edited", value: "true")]
|
||||||
let assetEndpoint = "/assets/" + asset.id + "/thumbnail"
|
let assetEndpoint = "/assets/" + asset.id + "/thumbnail"
|
||||||
|
|
||||||
guard
|
guard
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue