1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-20 02:48:57 +00:00

Fix Philips TV channel logos not displaying in media browser (#158975)

This commit is contained in:
Davide
2025-12-15 20:04:41 +01:00
committed by GitHub
parent 2679ac3f5e
commit d51cca3325

View File

@@ -250,6 +250,10 @@ class PhilipsTVMediaPlayer(PhilipsJsEntity, MediaPlayerEntity):
media_content_type=MediaType.CHANNEL,
can_play=True,
can_expand=False,
thumbnail=self.get_browse_image_url(
MediaType.CHANNEL,
f"{self._tv.channel_list_id}/{channel['ccid']}",
),
)
for channel in self._tv.channels_current
]
@@ -289,6 +293,10 @@ class PhilipsTVMediaPlayer(PhilipsJsEntity, MediaPlayerEntity):
media_content_type=MediaType.CHANNEL,
can_play=True,
can_expand=False,
thumbnail=self.get_browse_image_url(
MediaType.CHANNEL,
f"{list_id}/{channel['ccid']}",
),
)
for channel in favorites.get("channels", [])
]
@@ -412,7 +420,11 @@ class PhilipsTVMediaPlayer(PhilipsJsEntity, MediaPlayerEntity):
if media_content_type == MediaType.APP and media_content_id:
return await self._tv.getApplicationIcon(media_content_id)
if media_content_type == MediaType.CHANNEL and media_content_id:
return await self._tv.getChannelLogo(media_content_id)
list_id, _, channel_id = media_content_id.partition("/")
if not channel_id:
channel_id = list_id
list_id = "all"
return await self._tv.getChannelLogo(channel_id, list_id)
except ConnectionFailure:
_LOGGER.warning("Failed to fetch image")
return None, None