Skip to content

Display album artwork in the TUI via artwork@v1#266

Merged
balloob merged 11 commits into
mainfrom
feat/tui-artwork
Jun 16, 2026
Merged

Display album artwork in the TUI via artwork@v1#266
balloob merged 11 commits into
mainfrom
feat/tui-artwork

Conversation

@maximmaxim345

@maximmaxim345 maximmaxim345 commented Jun 11, 2026

Copy link
Copy Markdown
Member

Renders album artwork in the Now Playing panel using the artwork@v1 role. The role is only registered when textual-image detects Kitty graphics or Sixel support at startup. Terminals without graphics support keep the existing layout since the Unicode block fallback can only render a couple of pixels.

Mainly wrote this to more easily test the artwork role since this doesn't require an ESP32 and most on desktop runnable implementations use the image url from the metadata role.

Screenshot

Screenshot 2026-06-15 at 18 40 48

@maximmaxim345 maximmaxim345 added the new-feature Request or implement a new feature label Jun 11, 2026
Comment thread sendspin/artwork_connector.py Outdated
Comment thread sendspin/artwork_connector.py
Comment thread sendspin/artwork_connector.py
Comment thread sendspin/tui/app.py Outdated
@maximmaxim345 maximmaxim345 marked this pull request as ready for review June 15, 2026 16:49
Copilot AI review requested due to automatic review settings June 15, 2026 16:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for rendering album artwork in the TUI “Now Playing” panel by negotiating the artwork@v1 role (only when terminal graphics are available) and decoding streamed artwork frames into Pillow images for display via textual-image.

Changes:

  • Negotiate artwork@v1 in the TUI client hello when terminal graphics are detected, and plumb decoded artwork into UIState.
  • Add an artwork connector (ArtworkHandler) to decode artwork frames and clear artwork on stream end/clear.
  • Add a small renderable cache + tests; introduce pillow and textual-image dependencies.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
sendspin/tui/app.py Negotiates artwork@v1, attaches artwork handler, updates UI state on artwork changes.
sendspin/tui/ui.py Adds artwork state and renders an artwork column in the Now Playing panel when available/wide enough.
sendspin/tui/artwork.py New helper to render artwork via textual-image with a small cache and support detection.
sendspin/artwork_connector.py New connector to decode artwork payloads with Pillow and emit latest image/clear events.
tests/tui/test_artwork.py Tests for the artwork render helper caching behavior.
tests/test_artwork_connector.py Tests for artwork decoding, channel filtering, and stream clear/end behavior.
pyproject.toml Adds pillow and textual-image runtime dependencies.
uv.lock Locks new dependencies (pillow, textual-image) and their transitive requirements.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sendspin/tui/artwork.py Outdated
Comment thread sendspin/artwork_connector.py
Comment thread sendspin/artwork_connector.py
@balloob balloob merged commit e15f174 into main Jun 16, 2026
2 checks passed
@balloob balloob deleted the feat/tui-artwork branch June 16, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature Request or implement a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants