Skip to content

Commit

Permalink
aliases are optional
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Dec 6, 2023
1 parent f6fb780 commit 1b2dba8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions music_assistant/server/providers/musicbrainz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ async def get_artist_details_by_album(
for artist_credit in result.artist_credit:
if compare_strings(artist_credit.artist.name, artistname, strict):
return artist_credit.artist
for alias in artist_credit.artist.aliases:
for alias in artist_credit.artist.aliases or []:
if compare_strings(alias.name, artistname, strict):
return artist_credit.artist
return None
Expand All @@ -392,7 +392,7 @@ async def get_artist_details_by_track(
for artist_credit in result.artist_credit:
if compare_strings(artist_credit.artist.name, artistname, strict):
return artist_credit.artist
for alias in artist_credit.artist.aliases:
for alias in artist_credit.artist.aliases or []:
if compare_strings(alias.name, artistname, strict):
return artist_credit.artist
return None
Expand Down

0 comments on commit 1b2dba8

Please sign in to comment.