sentriz / gonic

music streaming server / free-software subsonic server API implementation
ircs://irc.libera.chat/#gonic
GNU General Public License v3.0
1.58k stars 112 forks source link

Multiple genre/artist vorbis tags #416

Closed tamland closed 10 months ago

tamland commented 10 months ago

gonic version: v0.16.1

if from docker, docker tag: latest

I did some testing and it seems like the multi-genre/artist support in gonic expects the use of tag names ARTISTS and GENERES? At least I'm unable to get it working when using multiple ARTIST/GENRE tags (it only picks up the first one).

However, vorbis natively support multiple tags and explicitly encourage the use of multiple ARTIST tags etc: https://xiph.org/vorbis/doc/v-comment.html

I also have all my music tagged with way and it would be great if gonic could support the standard vorbis tag names as well.

sentriz commented 10 months ago

hey @tamland, have you get the GONIC_MULTIVALUE{GENRE,ARTIST,ALBUM_ARTIST} flags?

in your case they should be set to the multi value

https://github.com/sentriz/gonic?tab=readme-ov-file#multi-valued-tags-v016

also, when changing the multi valued settings, a full/slow scan must be done once

sentriz commented 10 months ago

oh sorry i misread. i think you're right, only artists is used for multi valued tags. but the reason is how picard and beets.io work.

the single value would be for the concatenated version, for example this release you could see these vorbis comments:

ARTIST=Deepchord presents Echospace
ARTISTS=Deepchord
ARTISTS=Echospace

(ARTISTS repeated twice)

tamland commented 10 months ago

I see. I dont use any of those but have a lot of bought music that sometimes comes pre-tagged this way :) I.e. it only contains:

ARTIST=Deepchord
ARTIST=Echospace
GENRE=A
GENRE=B
sentriz commented 10 months ago

interesting I haven't seen that format before. how does it encode the concatenated / display values?

and you don't use any taggers like picard or beets.io?

tamland commented 10 months ago

I use Kid3. I don't know if there is any standard for this except the one page I linked to which describes multiple artists: https://xiph.org/vorbis/doc/v-comment.html

Do you think it's possible to support both without breaking picard/beets?

sentriz commented 10 months ago

that looks like an example, I think I saw some sort of standard somewhere - I'll try to find it

but also, we need to have both somehow. for example gonic needs to return displayAlbumArtist "DeepChord presents Echospace" and albumArtists ["DeepChord", "Echospace"] over the Subsonic API

and I don't know how it could do that without two distinct tags

also handing legacy desktop music players which don't understand multi valued tags

edit:

here is one example of ARTISTS https://picard-docs.musicbrainz.org/downloads/MusicBrainz_Picard_Tag_Map.html

not definitive but it comes from the metabrainz foundation at least

dweymouth commented 10 months ago

What about conditional logic:

sentriz commented 10 months ago

@dweymouth i think that could work, though there's some lost of information there

if all we see is ARTIST=A ARTIST=B

and no ARTISTS, gonic has to make up a displayAlbumArtist. does it join with a " & "? or with a ", ", maybe an " and "?

and also that displayAlbumArtist displayArtist field is kind of important - for example when scrobbling to LastFM, if you have a non-standard credit string, it's going to look different to everyone elses. you'll see like "only 1 listener" to this artist (maybe the real one was "A, B & C" for example)

it's not ideal to make one up i think

sentriz commented 10 months ago

and hey @tamland to add to this last comment here, i think it would be a lot of complexity to support treating two tags having different meanings in different contexts, so closing for now. but if you do find some difinitive source on the meaning of the tags (and maybe that beets and picard have it wrong) i'd definitely hear it

could also be an option for your library to just copy the singular named tags to the plural? for example with python/mutagen some

for f in files:
    audio = FLAC(f)
    audio['ARTISTS'] = audio['ARTIST']
    audio['ALBUMARTISTS'] = audio['ALBUMARTIST']
    audio.save()

could do the trick? that said, gonic's displayAlbumArtist will only show the first tag, and lastfm scrobbles will be a little strange, but if you don't have display/singular tags anywhere in your library that just how it i suppose

tamland commented 10 months ago

If you follow picard: https://picard-docs.musicbrainz.org/downloads/MusicBrainz_Picard_Tag_Map.html

There is actually no mention of "genres" og "albumartist". Only the "artists" tag use plural.