Multi-valued fields
As discussed here: https://github.com/navidrome/navidrome/issues/211
The current subsonic API only supports one value for any metadata field name. This is limiting functionality since especially artist and genre often have multiple values in the tags.
Proposal
Three new elements would be added to the AlbumID3 and Child complexTypes: genres, artists and artistIDs which are all xs:sequence, so they can contain multiple values.
Any new multi-valued metadata fields that might get added to the API going forwards (say: mood, composer, conductor, remixer, lyricist, producer, etc) would be an xs:sequence from the start, this dual artist/artists thing is only for these existing fields.
Backwards/forwards compatibility:
- old servers would return
genreandartist, which is fine since the lists are are optional - new servers would send
genreandartist(containing the first genre and first artist), as well asgenresandartistslists - old clients would use the single-valued attributes and ignore these new lists
- new clients use the lists, provided of course they can handle them
Alternatives (all up for discussion)
- make
artistanxs:sequence(breaks compatibility since it's currentlyxs:attribute) - define a separator character (semicolon, pipe), and return an
xs:attributelikeKanye West;Jay-ZorKanye West|Jay-Zasartist, and let the clients deal with parsing it. Downside: multiple values in one element is very un-XML, looks bad on legacy clients, and also creates edge cases for artists with the separator character in their name - this is exactly what happened when id3v2.3 defined the forward slash/as separator, andAC/DCended up being split. - make
artist nameandartist IDparts of a 2-columnartistslist, not two separatexs:sequences
Something like:
<xs:element name="artists">
<xs:sequence>
<xs:element name="artist" type="sub:Artist" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:element>
<xs:element name="genres">
<xs:sequence>
<xs:element name="genre" type="sub:Genre" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:element>