Skip to content

Commit 254694b

Browse files
authored
Fix track icons for Apps and Radios in Squeezebox (home-assistant#151001)
1 parent bcfa7a7 commit 254694b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

homeassistant/components/squeezebox/browse_media.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,16 @@ def _get_item_thumbnail(
248248
item_type: str | MediaType | None,
249249
search_type: str,
250250
internal_request: bool,
251+
known_apps_radios: set[str],
251252
) -> str | None:
252253
"""Construct path to thumbnail image."""
253254
item_thumbnail: str | None = None
255+
254256
track_id = item.get("artwork_track_id") or (
255-
item.get("id") if item_type == "track" else None
257+
item.get("id")
258+
if item_type == "track"
259+
and search_type not in known_apps_radios | {"apps", "radios"}
260+
else None
256261
)
257262

258263
if track_id:
@@ -357,6 +362,7 @@ async def build_item_response(
357362
item_type=item_type,
358363
search_type=search_type,
359364
internal_request=internal_request,
365+
known_apps_radios=browse_data.known_apps_radios,
360366
)
361367

362368
children.append(child_media)

0 commit comments

Comments
 (0)