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
  • Loading branch information
mgoltzsche committed Dec 6, 2023
1 parent eeb3b4f commit f4a078e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mopidy_beets/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ 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 "album_id" in d and d["album_id"]
else None
),
"composers": lambda d: _filter_none([parse_artist(d, "composer")]),
"performers": None,
Expand Down

0 comments on commit f4a078e

Please sign in to comment.