From 10adb4edcecc13479baaf198361ccf36f53164d6 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Mon, 23 Dec 2024 09:11:37 +0000 Subject: [PATCH] Allow Chromecast provider to handle/avoid images which are "too big" (#1806) --- music_assistant/controllers/player_queues.py | 2 +- music_assistant/providers/chromecast/__init__.py | 2 +- scripts/setup.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/music_assistant/controllers/player_queues.py b/music_assistant/controllers/player_queues.py index eb52f897e..48498ba25 100644 --- a/music_assistant/controllers/player_queues.py +++ b/music_assistant/controllers/player_queues.py @@ -1261,7 +1261,7 @@ def player_media_from_queue_item(self, queue_item: QueueItem, flow_mode: bool) - album.name if (album := getattr(queue_item.media_item, "album", None)) else "" ) if queue_item.image: - media.image_url = self.mass.metadata.get_image_url(queue_item.image) + media.image_url = self.mass.metadata.get_image_url(queue_item.image, size=512) return media async def get_artist_tracks(self, artist: Artist) -> list[Track]: diff --git a/music_assistant/providers/chromecast/__init__.py b/music_assistant/providers/chromecast/__init__.py index fdd5ff549..b206bde92 100644 --- a/music_assistant/providers/chromecast/__init__.py +++ b/music_assistant/providers/chromecast/__init__.py @@ -675,7 +675,7 @@ async def update_flow_metadata(self, castplayer: CastPlayer) -> None: # update metadata of current item chromecast if media_controller.status.media_custom_data["queue_item_id"] != current_item.queue_item_id: image_url = ( - self.mass.metadata.get_image_url(current_item.image) + self.mass.metadata.get_image_url(current_item.image, size=512) if current_item.image else MASS_LOGO_ONLINE ) diff --git a/scripts/setup.sh b/scripts/setup.sh index 43837c983..79750bdf8 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -13,7 +13,7 @@ if [ -d "$env_name" ]; then echo "Virtual environment '$env_name' already exists." else echo "Creating Virtual environment..." - python -m venv .venv + ${PYTHON:-python} -m venv .venv fi echo "Activating virtual environment..." source .venv/bin/activate