Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multiple Artist tags for track with multiple artists #44

Closed
splintersuidman opened this issue Jun 10, 2021 · 3 comments · Fixed by #45
Closed

Add multiple Artist tags for track with multiple artists #44

splintersuidman opened this issue Jun 10, 2021 · 3 comments · Fixed by #45

Comments

@splintersuidman
Copy link
Contributor

splintersuidman commented Jun 10, 2021

Currently, mopidy-mpd creates the artists tag by concatenating the artists of a track, separated with a semicolon. For context, this happens in this line:

("Artist", concat_multi_values(track.artists, "name")),

The MPD protocol documentation states:

There can be multiple values for some of these tags. For example, MPD may return multiple lines with a performer tag. A tag value is a UTF-8 string.

The same seems to be true for the artist tag. I tried the following code (which is basically inlining concat_multi_values but without the join):

    result = [
        ("file", track.uri),
        ("Time", track.length and (track.length // 1000) or 0),
        ("Album", track.album and track.album.name or ""),
    ] + [
        ("Artist", getattr(a, "name"))
        for a in track.artists
        if getattr(a, "name", None) is not None
    ]

And it worked just fine; in ncmpcpp the artists are shown separated by |.

So I wonder: why are the artists' names concatenated and is a single artist tag used, instead of an artist tag for every artist of the track?

I would rather have one tag per artist, since that would work better with my scrobbling setup.

Is it possible to change this behaviour? If so, I’d be happy to implement it and open a pull request. I think the same can be done for the composer and performer tag.

@djmattyg007
Copy link

It could be for historical reasons, or it could be that some MPD clients used by some of the maintainers don't properly support this behaviour. If you are going to submit a PR, it might be worth having a config setting to control the new behaviour.

@jodal
Copy link
Member

jodal commented Sep 11, 2021

This probably has roots all the way back in late 2009/early 2010 when most of the MPD implementation was written. If the protocol docs say so and the popular clients support it, I'm all for changing this.

@jodal jodal closed this as completed in #45 Sep 11, 2021
jodal added a commit that referenced this issue Sep 11, 2021
Add support for multiple tags for multiple values (fixes #44)
@baloe
Copy link

baloe commented Dec 26, 2022

Oh I am so craving for an MPD client that actually does support multiple album artists, is there one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants