-
-
Notifications
You must be signed in to change notification settings - Fork 799
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
Support for the Language tag #1377
Comments
Hey @certuna, what would be the usage of this tag(s)? Just information, or any kind of filtering on the UI? If it is just informational, we can have one text field to store multiple values, and parse it into an array when sending it to the UI |
I was envisioning we'd have a similar dropdown filter as we have now for Genre, so you could filter in the Song or Album view for I agree that if we do this without the filter option and just show it in the Song list as an informative column, you could store multiple languages as a comma separated string in the |
I would find this very useful for smart playlists in the long run f.e. Songs with 'genre=Hip-Hop' & 'lang=fra' That said I don't have my song languages tagged multi-valued |
I actually not sure if we need to support multiple languages. The use case I see is what @metalheim just said above: to filter songs by language in a smart-playlist (or even in a UI filter). For this, IMHO, what really matter is the main language, right? |
Many songs exist with two or more languages (is Don Omar & Lucenzo's "Danza Kuduro" a Portugese or Spanish language song?), but I think it's fine to implement this initially as single-valued instead of multi-valued. We can always make it multivalued later, and check if the performance/complexity hit is worth it. Edit: we should probably make |
In addition to showing the language embedded in the metadata, this information may also be critical for assigning the right |
Are there any plans on implementing the milestone 1 on the server side in the near future? |
I'm currently working on multiple artist support, but once that's done support for Key and Language are next. |
there is an excellent go library /databse that can be used to lookup and sanitize lang uage strings (drop all non-ISO 639-2 values) https://github.com/barbashov/iso639-3/blob/1f4ffb2d8d1cb8137d29ac6deb9e28b7e216b767/iso6393.go#L47 |
That's cool, definitely useful. ISO 639-3 is the current standard, but id3v2.4 was published over twenty years ago when 639-2 was the latest and greatest so I guess that's what I'll use. As usual, Vorbis has nothing standardized. I'm now looking into the Intl.DisplayNames specs for the Web UI, it seems that it can use both ISO 639-1 two-letter codes ("en") and 639-2 three-letter codes ("eng") so it looks like it's OK to sanitize 639-2 tags & store them in the database. Then 639-3 is not needed. |
By the way, I just found out that in the Musicbrainz DB, language is not a multi-valued property: a song can have only one language, or the tag "multiple languages" ("mul"), or "no language" aka instrumental ("zxx"). We can do the same in Navidrome, it's probably best to aggregate to "most common" language of the album instead of making an album "multi-language" as soon as there's even one song with another language. |
Ok, after reading your comment again, I realized my questions were already answered:
|
This is a placeholder Issue for implementation of support for the Language tag (
TLAN
in id3,LANGUAGE
in Vorbis Comments, etc). It is defined in the id3v2 tag specification as an ISO 639-2 code ("eng", "spa").Edited to reflect the latest state of discussions on how to implement this.
Thing to consider:
language
as an array in the API, all just like with Genres. This may be more complex than it's worth. One idea is to initially implement Language as a single value tag - MusicBrainz Picard for example only does one language per song, if there's more then it tagsmul
("multiple languages")eng
and 1 song inspa
to 1 album languagemul
. This is...probably not what we want.eng
and 10 songs without lyricszxx
(="no language"), we probably want the album to beeng
.all_artist_ids
field: store multiple languages in one field (language
= "eng fra spa"), use LIKE in the sql query, and split the string client-side in the WebUI.Milestone 1: single-value support only for songs
Serverside:
language
column in themedia_file
tableClientside (Web UI):
Intl.DisplayNames
Javascript method to convert the ISO 639-2 codes to localized language namesMilestone 2: single-value roll-up to album and artist
Serverside:
language
column in thealbum
andartist
tablelanguage
to thealbum
andartist
API endpoint (as arrays?)Clientside (Web UI):
Intl.DisplayNames
Javascript method to convert the ISO 639-2 codes to localized language namesMilestone 3: multi-value support for songs, albums and artists
Serverside:
language
,album-language
andsong-language
language
column from themedia_file
tablelanguage
to thealbum
API endpoint (multi-valued)Clientside (Web UI):
The text was updated successfully, but these errors were encountered: