Skip to content

Commit

Permalink
Ignore None album_id within beets result
Browse files Browse the repository at this point in the history
This fixes a bug that prevented singleton (none-album) search results from showing up within mopidy.
Fixes #39

Co-authored-by: Nick Steel <[email protected]>
  • Loading branch information
2 people authored and sumpfralle committed Dec 12, 2023
1 parent eeb3b4f commit dfb1160
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mopidy_beets/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def parse_track(data, api):
"name": "title",
"artists": lambda d: _filter_none([parse_artist(d, "artist")]),
"album": lambda d, api=api: (
api.get_album(d["album_id"]) if "album_id" in d else None
api.get_album(d["album_id"]) if d.get("album_id") else None
),
"composers": lambda d: _filter_none([parse_artist(d, "composer")]),
"performers": None,
Expand Down

0 comments on commit dfb1160

Please sign in to comment.