[API Request] Add a ThumbHash or BlurHash to the album response entity #12
Replies: 2 comments 9 replies
-
|
Is this something the server should be dictating? I guess, having the cover art, the server can more easily generate a representative "blur hash". But still, if the image dimensions at least were returned by the server, the client could do something with that and it might even be better; the client should dictate its own look and feel after all. Do we want to take on that extra responsibility and bake a specific implementation like this into the API? I might vote for this as an extension, but I'm more nervous having it as part of the first-class album API. |
Beta Was this translation helpful? Give feedback.
-
|
Just want to point out that since I proposed this, a new standard https://evanw.github.io/thumbhash/ has been created which seems to be technically superior. Maybe if we add this proposal we should make it extensible, so the base64 string and an algorithm name (eg BlurHash or ThumbHash) are exposed, but we should pick one of the 2 as the standard for now. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Type of change
API extension
Proposal description
BlurHash GitHub website is a standard for encoding a placeholder for an image in a short string. It could be useful for clients to be able to display a placeholder for an album cover before the cover is loaded, especially in the case where a client is launched for the first time with an empty cover cache and the server rate limits requests to the
getCoverArtAPI.Backward compatibility impact
New field on the album response type. Not a breaking change
Backward compatibility
API details
The album entity (returned by endpoints such as
getAlbumList2,getArtistetc.) should have a new fieldblurHash="<blurHashStr>". Clients may use this to show a placeholder for the cover image - that vaguely resembles the actual cover - before the image is available. It will be optional for servers to support this, and clients should have a fallback (e.g. generic placeholder image) for servers that do not return blurHashes.Security impacts
No response
Potential issues
No response
Alternative solutions
No response
Beta Was this translation helpful? Give feedback.
All reactions