AudioMuse-AI icon indicating copy to clipboard operation
AudioMuse-AI copied to clipboard

[FEATURE] Use multiple song artists when available

Open J0R6IT0 opened this issue 11 months ago • 2 comments

Right now, AudioMuse treats the full artist string as a single unique artist. So entries like "deadmau5", "deadmau5 feat. Rob Swire" or "deadmau5 feat. Kaskade" are all considered different artists. Because of this, when you search for artists similar to, for example, deadmau5, it returns a lot of collaborations, such as the mentioned above, which makes the whole thing quite messy and not very useful.

Many media servers, Navidrome in my case, support multiple artists. Ideally AudioMuse should store each artist separately and associate each song with multiple artists. Then when computing similarity for "artist A", it should consider every song where "artist A" appears, even in collaborations. This way there would be no duplicated artists and integrating the system with external apps would be much useful, such as Navidrome plugins for similar artists.

J0R6IT0 avatar Dec 09 '25 22:12 J0R6IT0

Just for reference I report also here what I wrote on Navidrome's Discord:

This is how AudioMuse-AI assing artist to a song during the analysis:


def _select_best_artist(song_item, title="Unknown"):
    """
    Selects the best artist field from Navidrome song item, prioritizing track artists over album artists.
    This helps avoid "Various Artists" issues in compilation albums.
    Returns tuple: (artist_name, artist_id)
    """
    # Priority: artist (track artist) > albumArtist > fallback
    # Navidrome provides artistId and albumArtistId
    if song_item.get('artist'):
        track_artist = song_item['artist']
        artist_id = song_item.get('artistId')
        used_field = 'artist'
    elif song_item.get('albumArtist'):
        track_artist = song_item['albumArtist']
        artist_id = song_item.get('albumArtistId')
        used_field = 'albumArtist'
    else:
        track_artist = 'Unknown Artist'
        artist_id = None
        used_field = 'fallback'
    
    return track_artist, artist_id

full file here: https://github.com/NeptuneHub/AudioMuse-AI/blob/main/tasks/mediaserver_navidrome.py

So basically it prioritize the track artist if returned by Navidrome, otherwise the album artist, otherwise it happend Unknown Artist. It also pair the name with the id.

This to say that there isn't any extra logic: what is returned by the Music Server AudioMuse-AI use. So on that I close the issue because there is no implementation planned on this.

NeptuneHub avatar Jan 07 '26 18:01 NeptuneHub

I think this should be reconsidered. It's neither a Navidrome bug nor a user metadata mistake that causes Navidrome to return separators like "feat." as part of the track artist. It's ideal tagging for navidrome. It's also not an uncommon use of the track artist field, MusicBrainz uses the same format.

Thus, outside of multiple artist support or filtering the track artist to get a singular artist, the ideal way to support such cases is to prioritize the album artist instead. It would cause far fewer duplicated artists as the only time an album artist would not be singular is in compilation albums. Would this be acceptable?

jahtrel avatar Jun 05 '26 18:06 jahtrel