Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion custom_components/mass_queue/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions custom_components/mass_queue/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading