mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Squeezebox: Fix tracks not having thumbnails (#147187)
This commit is contained in:
parent
3151713a34
commit
676567f471
@ -221,12 +221,16 @@ def _get_item_thumbnail(
|
||||
) -> str | None:
|
||||
"""Construct path to thumbnail image."""
|
||||
item_thumbnail: str | None = None
|
||||
if artwork_track_id := item.get("artwork_track_id"):
|
||||
track_id = item.get("artwork_track_id") or (
|
||||
item.get("id") if item_type == "track" else None
|
||||
)
|
||||
|
||||
if track_id:
|
||||
if internal_request:
|
||||
item_thumbnail = player.generate_image_url_from_track_id(artwork_track_id)
|
||||
item_thumbnail = player.generate_image_url_from_track_id(track_id)
|
||||
elif item_type is not None:
|
||||
item_thumbnail = entity.get_browse_image_url(
|
||||
item_type, item["id"], artwork_track_id
|
||||
item_type, item["id"], track_id
|
||||
)
|
||||
|
||||
elif search_type in ["apps", "radios"]:
|
||||
|
Loading…
x
Reference in New Issue
Block a user