Skip to content

Commit

Permalink
Merge pull request #1221 from darrell-k/NAMESORTforUserDefinedRoles
Browse files Browse the repository at this point in the history
Write NAMESORT values for user-defined roles
  • Loading branch information
michaelherger authored Nov 18, 2024
2 parents aafedbd + b9fb246 commit 5254f31
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions Slim/Control/Queries.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6351,6 +6351,7 @@ sub _getTagDataForTracks {
utf8::decode( $c->{'contributors.name'} ) if exists $c->{'contributors.name'};
utf8::decode( $c->{'genres.name'} ) if exists $c->{'genres.name'};
utf8::decode( $c->{'comments.value'} ) if exists $c->{'comments.value'};
utf8::decode( $c->{'tracks.discsubtitle'}) if exists $c->{'tracks.discsubtitle'};
}

my $id = $c->{'tracks.id'};
Expand Down
16 changes: 9 additions & 7 deletions Slim/Schema.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2765,13 +2765,15 @@ sub _preCheckAttributes {
# since the tag may need to be split. See bugs #295 and #4584.
#
# Push these back until we have a Track object.
for my $tag (Slim::Schema::Contributor->contributorRoles, qw(
COMMENT GENRE ARTISTSORT PIC APIC ALBUM ALBUMSORT DISCC
COMPILATION REPLAYGAIN_ALBUM_PEAK REPLAYGAIN_ALBUM_GAIN
MUSICBRAINZ_ARTIST_ID MUSICBRAINZ_ALBUMARTIST_ID MUSICBRAINZ_ALBUM_ID
MUSICBRAINZ_ALBUM_TYPE MUSICBRAINZ_ALBUM_STATUS RELEASETYPE
ALBUMARTISTSORT COMPOSERSORT CONDUCTORSORT BANDSORT ALBUM_EXTID ARTIST_EXTID WORK WORKSORT
)) {
for my $tag (Slim::Schema::Contributor->contributorRoles, (map { $_ . 'SORT' } Slim::Schema::Contributor->contributorRoles()),
qw(
COMMENT GENRE PIC APIC ALBUM ALBUMSORT DISCC
COMPILATION REPLAYGAIN_ALBUM_PEAK REPLAYGAIN_ALBUM_GAIN
MUSICBRAINZ_ARTIST_ID MUSICBRAINZ_ALBUMARTIST_ID MUSICBRAINZ_ALBUM_ID
MUSICBRAINZ_ALBUM_TYPE MUSICBRAINZ_ALBUM_STATUS RELEASETYPE
ALBUM_EXTID ARTIST_EXTID WORK WORKSORT
))
{

next unless defined $attributes->{$tag};

Expand Down

0 comments on commit 5254f31

Please sign in to comment.