Skip to content

Return an empty album_art when the device reports a placeholder - #138

Open
ccristal wants to merge 2 commits into
velbus:mainfrom
ccristal:fix/album-art-placeholder
Open

ccristal wants to merge 2 commits into
velbus:mainfrom
ccristal:fix/album-art-placeholder

Conversation

@ccristal

@ccristal ccristal commented Oct 18, 2026 •

Copy link
Copy Markdown

Fixes #137

LinkPlay/WiiM devices report missing album art as the placeholder string unknow in getMetaInfo (e.g. "albumArtURI": "unknow" for most internet radio stations). LinkPlayPlayer.album_art passed it through unchanged, so consumers treated it as an image URL; in Home Assistant every artwork request then fails with Invalid URL: port can't be converted to integer (http://<ha-host>:8123unknow).

Change

  • album_art returns the reported value only if it is an http:// or https:// URL, and an empty string otherwise, which is what it already returned when the field is missing.
  • Tests cover http/https URLs, the unknow placeholder, an empty value and missing meta info. The unknow case fails without the fix.

Testing

  • pytest: 295 passed, 1 skipped.
  • mypy on bridge.py: unchanged (the one existing missing-import error).

Note: Home Assistant's linkplay integration also needs to treat an empty album_art as no image (home-assistant/core#187145), because the media player base class still fetches an empty-string URL.

🤖 Generated with Claude Code

LinkPlay/WiiM devices report missing album art as the string "unknow" in
getMetaInfo. album_art passed it through unchanged, so consumers treated it
as an image URL. Only return http(s) URLs and an empty string otherwise.

Fixes velbus#137

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DBuBhcANHioWShtwB1sTxq
@ccristal ccristal changed the title Return an empty album_art when the device reports a placeholder Handle WiiM getMetaInfo placeholders: "unknow" album art and idle "Failed" Oct 19, 2026
@ccristal ccristal changed the title Handle WiiM getMetaInfo placeholders: "unknow" album art and idle "Failed" Return an empty album_art when the device reports a placeholder Oct 19, 2026
@ccristal
ccristal force-pushed the fix/album-art-placeholder branch from cb3f77f to e8151c3 Compare October 19, 2026 08:17
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

album_art returns the device placeholder "unknow" when there is no album art

1 participant