Can you sort after only the main artist?

I have several artists that have collaborated with multiple bands and people, and as such get multiple folders. For example, my Elvis Costello are sorted in several folders
Costello, Elvis
Costello, Elvis & [guy]
Costello, Elvis and [Band]
Costello, Elvis with [musician]

All together nine folders. Same with Brian Eno, Frank Sinatra and several others. Often with rather varied ways of adding the additional artists.

Is there way to write the sorting-script, or a plug-in, so that, in the case of folders named, in this case, Elvis Costello and The Whoever, they will all go in the Elvis Costello folder?

If you’re talking Album Artist and if I understand you correctly, I wrote a Picard plug-in that should provide the information you need for your naming script. It is called AlbumArtist Extension and is available at:

Once installed and enabled, it will provide some additional scripting variables including %_aaeSortPrimaryAlbumArtist% which contains the sorted version of the first (primary) album artist.

If you’re talking about the artists credited for each of the tracks (Artist rather than AlbumArtist), then this probably won’t help you.

If I’ve missed or misinterpreted your request, please let me know.


Didn’t know about that plugin, but there are some album artists in my library I’d rather not have sorted under the first album artist in the list – “Anelli Heed and the Wasteland Wailers” should be under “Wasteland Wailers, The”. Instead, I use a combination of two manually-set custom tags, which are luckily not too much more difficult to manage in Picard than the built-in tags:

$noop(Avoid repeated cascades which may easily become out-of-sync with each other on editing)
$noop(Additionally, provide a means of manually specifying the folder with %artistfolder%)

$noop(Optionally trim portions of the artist string shared by the level higher in the hiearchy)
		_ $trim($right(%_savealbumartist%,$sub($len(%_savealbumartist%),$len(%enclosingfolder%)))),

$noop(Provide means of collecting releases from artists with many "feat" or "with")
$noop(Will always have the full album artist if %enclosingfolder% isn't set, but may shorten it if it is)

The last two lines then replace the %albumartistsort% level you already have in your naming script. The combination allows you to either set %artistfolder% to “Costello, Elvis” and the album will be saved as if that were the album artist without changing how your music players see it, set %enclosingfolder% to “Costello, Elvis” and have the “and [Band]” folder inside “Costello, Elvis” (actually trimming it so that it doesn’t duplicate the name: “Music/Costello, Elvis/and [Band]/[Album]”), or a combination of the two so you have a renamed artist folder inside an extra level of grouping.


Interesting code. Would you then set the artistfolder and/or the enclosingfolder variables in a user script?

You could definitely do that if you could come up with a pattern to it, but I personally just add the new tag manually – the “Add New Tag” dialogue in the bottom pane doesn’t care if the name you type is in the dropdown list or not, so I just have to be careful to spell them correctly each time I add one. Otherwise, it’s no different than adding, say, a genre.

1 Like

Thanks for the tip. I never thought of doing it that way. Learn something new every day. :slight_smile:

1 Like

Definitely wouldn’t be worth it for temporary variables (anything beginning with an underscore), and it’s not really in keeping with Picard’s mentality of automation, but I tend to go in and mess with the tags anyway – primarily because I want covers/remixes credited to the cover artist/remixer rather than relying on relationships for that, but also frequently because I split ETI out into the %subtitle% field – so adding an extra field isn’t all that different than what I’d be doing anyway.

Oh, and for anybody unused to taggerscript syntax who’s reading this, when I say "set %artistfolder% or %enclosingfolder%", the name you type in doesn’t include the percent signs.

1 Like