From f68ba639896e0e8d40c8ba58741a7c449c5844e5 Mon Sep 17 00:00:00 2001 From: albaintor <118518828+albaintor@users.noreply.github.com> Date: Sat, 4 Oct 2025 10:58:28 +0200 Subject: [PATCH 1/2] Fixed crash when Chromecast publish an artwork : the picture may be too large and should not converted in base64. Tested successfully with the direct URL --- requirements.txt | 6 +++--- src/tv.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 6b008a8..52abfb7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ -androidtvremote2==0.2.1 -ucapi==0.3.1 +androidtvremote2==0.2.3 +ucapi==0.3.2 pyee~=13.0.0 google_play_scraper==1.2.7 pillow>=11.2.1 requests>=2.32 -pychromecast~=14.0.7 +pychromecast~=14.0.9 httpx~=0.28.1 sanitize-filename~=1.2.0 \ No newline at end of file diff --git a/src/tv.py b/src/tv.py index ab28acf..a1727bd 100644 --- a/src/tv.py +++ b/src/tv.py @@ -911,7 +911,7 @@ async def _handle_new_media_status(self, status: MediaStatus): if status.images and len(status.images) > 0 and status.images[0].url != self._media_image_url: self._media_image_url = status.images[0].url - update[MediaAttr.MEDIA_IMAGE_URL] = await encode_icon_to_data_uri(self._media_image_url) + update[MediaAttr.MEDIA_IMAGE_URL] = self._media_image_url self._use_app_url = False else: self._media_image_url = None From 6801432557b6d47ab64e46f6a8c28f6f898fef5b Mon Sep 17 00:00:00 2001 From: Markus Zehnder Date: Wed, 29 Oct 2025 08:15:36 +0100 Subject: [PATCH 2/2] fixup! Fixed crash when Chromecast publish an artwork : the picture may be too large and should not converted in base64. Tested successfully with the direct URL --- src/tv.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tv.py b/src/tv.py index a1727bd..2761744 100644 --- a/src/tv.py +++ b/src/tv.py @@ -667,7 +667,9 @@ async def _apply_current_app_metadata(self, current_app: str) -> dict: else: icon_to_use = "" elif self._media_image_url: - icon_to_use = await encode_icon_to_data_uri(self._media_image_url) + # TODO what's the intended logic? + # `icon_to_use` is never used because of the inverse `if not self._media_image_url:` check below! + icon_to_use = self._media_image_url update[MediaAttr.STATE] = media_player.States.PLAYING.value # Skip applying app icon if media image from cast is present