From ba89f216c88224bc42033601e506fdab85f1dbdc Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Sat, 10 Jan 2026 09:38:07 -0500 Subject: [PATCH 1/2] Fix: Some issues getting playlist images --- custom_components/mass_queue/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/mass_queue/utils.py b/custom_components/mass_queue/utils.py index ba598d9..eda3601 100644 --- a/custom_components/mass_queue/utils.py +++ b/custom_components/mass_queue/utils.py @@ -156,8 +156,8 @@ def find_image_from_metadata(data: dict, remotely_accessible: bool): def find_image_from_album(data: dict, remotely_accessible: bool): """Attempts to find the image via the album key.""" - album = data.get("album", {}) - metadata = album.get("metadata", {}) + album = data.get("album") or {} + metadata = album.get("metadata") or {} img_data = metadata.get("images") if img_data is None: return None From f775c5d45b0b4f563088096b83bbb1662e67ce06 Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Wed, 14 Jan 2026 10:54:44 -0500 Subject: [PATCH 2/2] Fix: get_XXX failing if `album` is None --- custom_components/mass_queue/actions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/mass_queue/actions.py b/custom_components/mass_queue/actions.py index 1dd8bbf..cae811d 100644 --- a/custom_components/mass_queue/actions.py +++ b/custom_components/mass_queue/actions.py @@ -439,7 +439,7 @@ def format_playlist_track(self, playlist_track: dict) -> TRACK_ITEM_SCHEMA: def format_track_item(self, track_item: dict) -> TRACK_ITEM_SCHEMA: """Process an individual track item.""" result = self.format_item(track_item) - media_album = track_item.get("album") or "N/A" + media_album = track_item.get("album") media_album_name = "" if media_album is None else media_album.get("name", "") artists = track_item["artists"] artist_names = [artist["name"] for artist in artists]