Squeezebox: Fix tracks not having thumbnails (#147187)

This commit is contained in:
Sören Beye 2025-07-05 11:31:30 +02:00 committed by GitHub
parent 3151713a34
commit 676567f471
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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"]: