Skip to content

Commit 9ce9817

Browse files
authored
Merge pull request #98 from droans/dev
v0.10.1
2 parents 96a60a1 + 0ad3d16 commit 9ce9817

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

custom_components/mass_queue/actions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ def format_playlist_track(self, playlist_track: dict) -> TRACK_ITEM_SCHEMA:
439439
def format_track_item(self, track_item: dict) -> TRACK_ITEM_SCHEMA:
440440
"""Process an individual track item."""
441441
result = self.format_item(track_item)
442-
media_album = track_item.get("album") or "N/A"
442+
media_album = track_item.get("album")
443443
media_album_name = "" if media_album is None else media_album.get("name", "")
444444
artists = track_item["artists"]
445445
artist_names = [artist["name"] for artist in artists]

custom_components/mass_queue/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ def find_image_from_metadata(data: dict, remotely_accessible: bool):
156156

157157
def find_image_from_album(data: dict, remotely_accessible: bool):
158158
"""Attempts to find the image via the album key."""
159-
album = data.get("album", {})
160-
metadata = album.get("metadata", {})
159+
album = data.get("album") or {}
160+
metadata = album.get("metadata") or {}
161161
img_data = metadata.get("images")
162162
if img_data is None:
163163
return None

0 commit comments

Comments
 (0)