diff --git a/music_assistant/server/providers/filesystem_local/base.py b/music_assistant/server/providers/filesystem_local/base.py index aaa64c5ed..d464eb78d 100644 --- a/music_assistant/server/providers/filesystem_local/base.py +++ b/music_assistant/server/providers/filesystem_local/base.py @@ -748,13 +748,18 @@ 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