Album Artist Sorting with `,The`

Hi,

I would like to know if it is possible to format the ALBUMARTISTSORT and ARTISTSORT tags with groups and individuals in mind eg. The Chainsmokers & Coldplay formats to Chainsmokers; Coldplay; The instead of Chainsmokers, The; Coldplay, as I require it to do.

[#4]
T=5
1=%albumartist%
F=ALBUMARTISTSORT

[#5]
T=4
F=ALBUMARTISTSORT
1=^The (.+)
2=$1, The
3=0

[#6]
T=5
1=$regexp(%ALBUMARTIST%,'\\svs.?\\s','; ')
F=ALBUMARTISTSORT

[#7]
T=5
1=$regexp(%albumartistsort%,'\\sand?\\s','; ')
F=ALBUMARTISTSORT

[#8]
T=5
1=$regexp(%ALBUMARTIST%,'\\sfeat.?\\s','; ')
F=ALBUMARTISTSORT

[#9]
T=5
1=$regexp(%albumartistsort%,'\\swith?\\s','; ')
F=ALBUMARTISTSORT

[#10]
T=16
F=ALBUMARTISTSORT
1=;

[#11]
T=16
F=ALBUMARTISTSORT
1=,

[#12]
T=16
F=ALBUMARTISTSORT
1=&

[#13]
T=8
F=ALBUMARTISTSORT
1=; 

[#14]
T=2
F=ALBUMARTISTSORT
1=Artists, 
2=
3=0|0

I have traced it to the split field with ,. I need to somehow be able to use the , taking into account and igoring the split field when it preceeds The followed by a space... eg. , The.
I'm sure there must be a way, I just can't figure it out.

The safest way would be to replace all the possible combinations like The Chainsmokers & Coldplay with the new value like Chainsmokers; Coldplay

Every other attempt to detect and replace "the" will lead to unpredictable and unwanted results.
Just think about groups like
Bob Marley & The Wailers
The Jimi Hendrix Experience
Academy of St Martin in the Fields
Orchestral Manoeuvres in the Dark
Queens of the Stone Age
The Mamas & the Papas
and many many more.

You could run a separate filter after the fact, like;
%albumartistsort% HAS “, The; “
(Note the trailing space)
You can check the box for case-sensitive comparison if it applies.

And then use the quick action Replace for your albumartistsort field (again note the trailing space in both cases, and ignore the double quotes);
Search string “, The;
Replace string “;

As mentioned by @LyricsLover you will need to be cautious of some cases where the albumartistsort field may intentionally have this text. But if you are using this exact method including the spaces, it is very unlikely to happen.

Details of Replace are found here;

1 Like

AFAI understand the ~sort fields: they are never displayed, so it should be enough to include the preferred sort name.
Which would mean for me that all the superfluous articles vanish - or are kept deliberately.
My favourite artist name in that respect is "The The".
Also I think that the first 10 letters in each name should be enough to sort properly.
Any further effort spent to get more accuracy in the back parts of a name would be spent in vain.

The The - everyone’s (?) favorite reference for sorting!

Often full names for sorting are required…
McCartney, Linda
McCartney, Paul
McCartney, Paul & Wings
…are examples where the sorting strings are needed.

I do agree that in the use case for sorting fields, articles like A, An, and The can usually be dropped and still accomplish the desired results. Only in cases where there are a distinction between two separate requirements do I use them…
Jet
Jets
Jets, The

These are names not really with a "the" to be moved around - and that was the problem of OP I think.
Swapping first and last name is a completely different thing - which I, admittedly, also find absolutely superfluous as it does not simplify lists but generates a long list of exceptions.

I still think that the "The" (and probably other articles in other languages) can safely be omitted to get the sorting in the ~sort fields right.

Agreed

Reality is you either use the sort tags, and stick to your own set of rules as to how you want them to work, or you don't use them at all. But the choice is there.