Skip to content

Display artist#1576

Open
darrell-k wants to merge 30 commits into
LMS-Community:public/9.2from
darrell-k:display_artist
Open

Display artist#1576
darrell-k wants to merge 30 commits into
LMS-Community:public/9.2from
darrell-k:display_artist

Conversation

@darrell-k

Copy link
Copy Markdown
Contributor

Objective:

To capture the "human readable" artist tag from eg Musicbrainz as well as the underlying list of individual artists and provide this data to clients.
eg
ARTIST="Bill Evans Trio with Scott LaFaro and Paul Motian"
ARTISTS="Bill Evans; Scott LaFaro; Paul Motian"

Design:

New table contributor_display to hold these display names. Rows will not be created in the existing contributor table.

New join tables contributor_track_display and contributor_album_display to relate contributor_display.id to the tracks/albums and the actual contributors below the display name.

New columns in the albums and tracks tables to hold contributor_display.id.

Amend queries to return the new data.

Add the display artist to FTS album and track rows.

The scanning changes will be optional, with a new preference, in case users have already fixed their tags and do not want this functionality.

With thanks to @Rouzax

darrell-k and others added 18 commits May 2, 2026 16:54
Signed-off-by: darrell-k <darrell@darrell.org.uk>
Signed-off-by: darrell-k <darrell@darrell.org.uk>
Signed-off-by: darrell-k <darrell@darrell.org.uk>
Signed-off-by: darrell-k <darrell@darrell.org.uk>
Signed-off-by: darrell-k <darrell@darrell.org.uk>
Signed-off-by: darrell-k <darrell@darrell.org.uk>
Signed-off-by: Rouzax <GitHub@mgdn.nl>
In updateOrCreateBase, capture albumDisplayArtist and trackDisplayArtist
from the attributeHash before _preCheckAttributes strips/defers them.
Pass both values to _postCheckAttributes, which now calls
_getOrCreateDisplayContributor for each, writes display_contributor to
the track row, and forwards both IDs to _createOrUpdateAlbum and
_createContributorRoleRelationships. Without this, rescanning an
existing track never updated display_contributor.

Signed-off-by: Martijn Frazer <claude@mgdn.nl>
Signed-off-by: Rouzax <GitHub@mgdn.nl>
Register usePluralArtistTags in Behavior.pm prefs list so the web UI
can save it. Add to the setChange wipecache list so toggling the pref
triggers a rescan. Handle scalar plural tags (e.g. semicolon-joined
ALBUMARTISTS from TXXX) by routing through splitTag instead of
requiring an arrayref.

Signed-off-by: Rouzax <GitHub@mgdn.nl>
Functional changes for display_artist on 3NF schema
@Rouzax

Rouzax commented May 20, 2026

Copy link
Copy Markdown
Contributor

Also wanted to leave my draft documentation here as well
https://github.com/Rouzax/slimserver/blob/docs/artist-tags/docs/artist-tags-in-lms.md

darrell-k and others added 10 commits May 20, 2026 22:22
Signed-off-by: darrell-k <darrell@darrell.org.uk>
Signed-off-by: darrell-k <darrell@darrell.org.uk>
Signed-off-by: darrell-k <darrell@darrell.org.uk>
Signed-off-by: darrell-k <darrell@darrell.org.uk>
Signed-off-by: darrell-k <darrell@darrell.org.uk>
@michaelherger

Copy link
Copy Markdown
Member

I'm sorry, completely forgot about this PR 😖

New table contributor_display to hold these display names. Rows will not be created in the existing contributor table.

New join tables contributor_track_display and contributor_album_display to relate contributor_display.id to the tracks/albums and the actual contributors below the display name.

New columns in the albums and tracks tables to hold contributor_display.id.

Hmm... why would you have a direct albums -> contributor_display link AND with a join table?

Add the display artist to FTS album and track rows.

Is it worth this effort? Are you expecting many display names which would not be covered by the individual contributors? Eg. would you expect people to tag (just a stupid example) the display name as "The Beatles", and then the Fab Four as the actual artists?

I'll have to check out the code changes when I'm back at my computer.

@darrell-k

Copy link
Copy Markdown
Contributor Author

There may be further changes, will get back to developing/testing this with @mikeysas once @CDrummond has made the Material changes based on #1585 that you just merged. Everything is connected!

@michaelherger

Copy link
Copy Markdown
Member

Probably a question which has been discussed before, but it just crossed my mind while riding home: Couldn't the display name just another role? They would show up in the contributor tables like everybody else, just with this new role?

@darrell-k

Copy link
Copy Markdown
Contributor Author

Probably a question which has been discussed before, but it just crossed my mind while riding home: Couldn't the display name just another role? They would show up in the contributor tables like everybody else, just with this new role?

It's a container for artists or albumartists. The UI implementation will be that clicking the display name will pop up a list of the actual contributors.

@mikeysas

mikeysas commented Jun 8, 2026

Copy link
Copy Markdown

Probably a question which has been discussed before, but it just crossed my mind while riding home: Couldn't the display name just another role? They would show up in the contributor tables like everybody else, just with this new role?

It's a container for artists or albumartists. The UI implementation will be that clicking the display name will pop up a list of the actual contributors.

I will defer to you and @mherger as to the better approach, but would there be an advantage to creating a role and then adding an additional column to the contributor_track and contributor_album tables for the display value to handle the relationship and UI logic?

@michaelherger

Copy link
Copy Markdown
Member

It's a container for artists or albumartists. The UI implementation will be that clicking the display name will pop up a list of the actual contributors.

I will defer to you and @mherger as to the better approach, but would there be an advantage to creating a role and then adding an additional column to the contributor_track and contributor_album tables for the display value to handle the relationship and UI logic?

That's exactly why I was wondering about this (in my uninformed opinion) simpler approach: no schema changes would be needed! You can already have as many contributors in as many roles as you want. There might be a need to treat the display name somewhat differently from other roles. But I'd assume this to be much simpler than dealing with a completely new table and other schema changes.

But as @darrell-k is still working on this I'll go back to lurking mode 😄.

@mikeysas

mikeysas commented Jun 8, 2026

Copy link
Copy Markdown

That's exactly why I was wondering about this (in my uninformed opinion) simpler approach: no schema changes would be needed! You can already have as many contributors in as many roles as you want. There might be a need to treat the display name somewhat differently from other roles. But I'd assume this to be much simpler than dealing with a completely new table and other schema changes.

But as @darrell-k is still working on this I'll go back to lurking mode 😄.

The current design is built on a rule that a given contributor role on a track (or album) there can only be a single display name value in the singular tag (ARTIST) that represents the collection of one or more values in the plural tag (ARTISTS). This is enforced to point that if ARTIST contains multiple values by delimiter or tag values, the multiple values are treated as contributors like currently in 9.1.x and the plural tags (if any are if ignored). This is also a good thing as it protect current users from being impacted by this change defaulted on.

The DB design that @darrell-k implemented enforces this rule by design. With the role approach I guess technically the data could break this rule although that should only happen if some manipulated the db externally or some other problem, but would the code have to account for that possibility also.

I don’t have an opinion here. I am just sharing my thoughts out loud as it is interesting to me.

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 this pull request may close these issues.

4 participants