ArtistS to Title as feat

Hi all I’ve searched this forum for hours and tried to piece together just a basic script to take the %artists% tag and add everything after the first as a featured artist in the TITLE

Artist: C+C Music Factory
Artists: C+C Music Factory: Freedom Williams

Current Title: Gonna Make You Sweat
Desired Title: Gonna Make You Sweat (Feat. Freedom Williams)

Please someone put me out of my misery


1 Like

Just off the top of my head, how about something like (WARNING: Untested code):

%title%$if($gt($lenmulti(%artists%),1), \(feat. $join($slice(%artists%,1,),\, )\))

EDIT: Actually I just realized that exact use case is what I noted in the documentation for the $slice() function. :wink:

EDIT 2: A slightly improved version that separates the last featured artist with an ampersand rather than a comma. Again, untested code:

%title%$if($gt(%_artists_count%,1), \(feat. $if($gt(%_artists_count%,2),$join($slice(%artists%,1,-1),\, ) & $slice(%artists%,-1,),$slice(%artists%,1,))\))

Im getting a script error when i copy/paste that second script. Wrong number of arguments for slice

I did say, “Untested code”. :stuck_out_tongue_winking_eye:

I updated both items, so try now.

Ok both scripts are now error free but neither produce the desired result unfortunately (actually nothing seems to change at all)

Appreciate you trying, its further than i got


That really is odd, because both work perfectly here. Perhaps post your full naming script and maybe we can help resolve the issue.

Also, are you working with information retrieved from MusicBrainz or just the existing metadata in the files? If just the existing metadata, perhaps the artists tag isn’t populated (or not populated as a multi-value tag).

This is everything i have in scripting right now:






$set(albumartistsort,$rreplace(%albumartistsort%,; .*,))

$set(albumartist,$rreplace(%albumartist%,; .*,))

$set(Display_Artist,$rreplace(%artists%,; .*,))







%title%$if($gt(%_artists_count%,1), (feat. $if($gt(%_artists_count%,2),$join($slice(%artists%,1,-1),, ) & $slice(%artists%,-1,),$slice(%artists%,1,))))

EDIT: no plugins active either

Also heres another example that should work but for some reason isnt:

Artist: PF Project
Artists: PF Project; Ewan McGregor

Resultant Title: Choose Life
Desired Title: Choose Life (Feat. Ewan McGregor)

Is this in your file naming script, or in a tagging script? Are you trying to change the track title in the tags or the file name?

Also, can you provide an MBID for the release that you’re testing with, so that I can use the same retrieved metadata for testing here.

This is for tagging only please, not file naming

This is the release im currently looking at: Release “90 Club Hits From the 90’s” by Various Artists - MusicBrainz
There at a few tracks on it which have additional artistS which i want to put into the title tag as above

The above track: PF project - Choose life is CD 3 track 18
The previous track i mentioned with C+C music factory is CD 2 track 6

That’s why it didn’t work.

Try putting the following into a tagging script and see if that does what you want:

$set(title,%title%$if($gt(%_artists_count%,1), \(feat. $if($gt(%_artists_count%,2),$join($slice(%artists%,1,-1),\, ) & $slice(%artists%,-1,),$slice(%artists%,1,))\)))

Success! From the few albums i’ve just ran through it looks like it works exactly as required.
I’ll run some more trials but im optimistic this will solve my headache

Great job Bob, thankyou very much