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

[WebUI] display multiple genres for album #119

Closed
Tracked by #1251
certuna opened this issue Mar 27, 2020 · 9 comments · Fixed by #1251
Closed
Tracked by #1251

[WebUI] display multiple genres for album #119

certuna opened this issue Mar 27, 2020 · 9 comments · Fixed by #1251

Comments

@certuna
Copy link
Contributor

certuna commented Mar 27, 2020

The navidrome db stores Genre for individual tracks. Many albums have songs from different genres on them. In the Album view, the navidrome UI only displays one genre, even if the album has tracks with different genres tagged (note: not multiple genres per track, just a different genre for each track). The UI should display it as a list, for example "Pop, Disco, House, Hip-Hop".

@deluan
Copy link
Member

deluan commented Mar 19, 2021

We will need to introduce a genre table, with many-to-many relationships with artist, album and media_file. Then add a /genre rest endpoint to be consumed by the UI

@deluan
Copy link
Member

deluan commented May 31, 2021

While doing some work towards multi-valued tags, I just found out that the newest version of ffmpeg supports multi-valued tags (at least genre EDIT: and Vorbis comments):

From TagLib:

GENRE                      - "Experimental"
GENRE                      - "Progressive Rock"

From ffmpeg:

GENRE           : Experimental;Progressive Rock

Not great (we will have to split the string - what if ; is a valid value for the field), but it is better than nothing!

@certuna
Copy link
Contributor Author

certuna commented Jun 1, 2021

I think it's safe for us to assume that ; is not a valid value for the field, so many other music applications also treat ; as a separator, even if it's non-standard.

by the way, I've just tried this for id3v2.4, and ffprobe (29-May-2021 snapshot) still doesn't do multivalued (null-separated) tags for neither genre nor artist, so I guess it can parse multiple frames (how Vorbis does multi-valued tags), but not null-separated strings within one frame (how id3v2 does it).

@deluan
Copy link
Member

deluan commented Jun 2, 2021

I think it's safe for us to assume that ; is not a valid value for the field

I was referring to any fields, not only genre. I think ; would work for genre, grouping and maybe others, but not for artist (ex: Kairon; IRSE!)

Anyway, I decide to implement genre before grouping, and will accept ; and / as separators. Maybe will make it configurable.

@certuna
Copy link
Contributor Author

certuna commented Jun 2, 2021

/ as separator is problematic with a lot more artist names than ;.

Emby has the same problem, it splits by / (not just for id3v2.3 where that's the official separator but also for id3v2.4) so it needs a whitelist, and that's a rabbit hole you really don't want to go down.

@deluan
Copy link
Member

deluan commented Jun 2, 2021

will accept ; and / as separators

For genre and grouping only. For artist, I'm not planning on any separator. Maybe ; but that's out of the scope for now, let's focus on genre

Do you think / would be problematic for genre? Seems to be a common practice...

@certuna
Copy link
Contributor Author

certuna commented Jun 2, 2021

/ is fine for genre yes. Looking through all the hundreds of genres on RYM, haven't found any with that.

@deluan deluan linked a pull request Jul 17, 2021 that will close this issue
5 tasks
@deluan
Copy link
Member

deluan commented Jul 18, 2021

Implemented as part of #1251:

Screen Shot 2021-07-17 at 10 29 18 PM

Will close this when the PR is merged

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants