Repository navigation
Conversation
MA 2.10 replaced /imageproxy?path=&provider= with /imageproxy/<proxy_id> and removed the old form, so every artwork request returned HTTP 400. Use proxy_id when the server sends it and keep the legacy query form as a fallback for pre-2.10 servers. Sizes are rounded up to the set MA accepts (80/160/256/512/1024), since callers also ask for 128. The two places that re-point an MA-built image URL at the configured server now keep the original path instead of only its query string.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Album art fails to load on Music Assistant 2.10+: MA replaced the
/imageproxy?path=&provider=form with/imageproxy/<proxy_id>and removed theold one, so every artwork request now returns HTTP 400.
getImageUrl()now usesproxy_idwhen the server sends it and keeps the legacyquery form as a fallback, so the same build works against pre- and post-2.10
servers with no version check.
Details
Root cause — in MA 2.10.4 (
controllers/metadata/images.py) the onlyregistered route is
/imageproxy/*, andhandle_imageproxy()requires a64-char hex id taken from
MediaItemImage.proxy_id. A request to/imageproxy?path=…&provider=…never matches the/imageproxy/prefix andreturns a bare
400with an empty body — which is exactly what the app logs:Sizes — MA only accepts
{0, 80, 160, 256, 512, 1024}and 400s on anythingelse. Call sites in this repo pass 80, 128, 256 and 512, so 128 would have
failed;
_imageProxySize()rounds up to the nearest accepted value.The two re-host sites in
music_assistant_provider.dartrebuilt a URL as'$baseUrl/imageproxy?$queryString', keeping only the query and discarding thepath. Given a 2.10 URL that collapses
/imageproxy/<id>?size=512to/imageproxy?size=512, another 400. They now preserveimgUri.path, which isequivalent to the old behaviour on pre-2.10 servers.
Verified against a live MA 2.10.4 server (schema 65). Using a real
proxy_idpulled fromplayer_queues/all:/imageproxy/<proxy_id>?size=512&fmt=jpegimage/jpeg, 21 982 b/imageproxy/<proxy_id>?size=128(unclamped)/imageproxy?path=…&provider=…(before this PR)Clamped sizes 80/160/256/512 all return 200. Not compile-checked — no Flutter
toolchain was available where this was written.