Skip to content

Commit

Permalink
Ensure sort_name makes it to cache
Browse files Browse the repository at this point in the history
  • Loading branch information
MelHarbour committed Aug 1, 2024
1 parent dd7295f commit 3b71e70
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions music_assistant/server/providers/filesystem_local/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,13 +748,14 @@ async def _parse_track(self, file_item: FileSystemItem) -> Track:
# album artist(s)
if tags.album_artists:
for index, album_artist_str in enumerate(tags.album_artists):
artist = await self._parse_artist(album_artist_str, album_path=album_dir)
artist = await self._parse_artist(
album_artist_str,
album_path=album_dir,
sort_name=tags.album_artist_sort_names[index] if index<len(tags.album_artist_sort_names) else None
)
if not artist.mbid:
with contextlib.suppress(IndexError):
artist.mbid = tags.musicbrainz_albumartistids[index]
# album artist sort name
with contextlib.suppress(IndexError):
artist.sort_name = tags.album_artist_sort_names[index]
album_artists.append(artist)
else:
# album artist tag is missing, determine fallback
Expand Down

0 comments on commit 3b71e70

Please sign in to comment.