Conversation
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.
Summary
container_artbefore rendering preset artwork.Rationale
Some browsers may block or fail to render station artwork when the miniapp embeds external TuneIn CDN image URLs directly. Serving the same artwork through the local SoundCork origin avoids that browser-specific behavior while keeping the miniapp HTML stable.
Implementation Details
/miniapp/artwork?url=....httpandhttpsURLs ontunein.comorradiotime.comhostnames are proxied.Cache-Control: public, max-age=86400.miniapp_artwork_url()for preset cards, selected speaker now-playing artwork, and selected-preset artwork.Tests / Validation
black --check --target-version py312 soundcork/miniapp.py soundcork/tests/test_miniapp.pyisort --check-only soundcork/miniapp.py soundcork/tests/test_miniapp.pypython -m py_compile soundcork/miniapp.py soundcork/tests/test_miniapp.pytimeout 60s /home/hideo/opensource/soundcork-live/.venv/bin/python -m pytest -q soundcork/tests/test_miniapp.pypassed with5 passed, 1 warningin a clean worktree based onorigin/main./miniapp/artwork?url=http%3A%2F%2Fcdn-profiles.tunein.com%2Fs25574%2Fimages%2Flogoq.png%3Ft%3D1returning200 image/png, and Firefox displayed station logos after reload.Compatibility and Risk
The endpoint is intentionally not a general-purpose HTTP proxy. Unsupported hosts are rejected with
400, non-image responses with502, and large responses with502.Non-Goals / Follow-Ups