If all you want is to group collaborations together when all artists are the same, but in a different order, you can create a new library field using:
listsort([Artist]) and group by that.
The JRiver Wiki goes into a good amount of detail about expressions here:
http://wiki.jriver.com/index.php?title=Media_Center_expression_languageBut to make things a bit easier, I'll explain the expressions that I have used.
~dup= means "a duplicate of"
Any tags you use after that will be compared, so if you just use ~dup=
[Name] it will only look for duplicates inside the name field.
If you use ~dup=
[Name],[Artist] it will only show up as a duplicate if both the name and the artist fields are duplicated - but that only works when the Artist field is exactly the same on both tracks. As you found out, it doesn't apply when they are in a different order.
Now the [Artists (sorted)] library field we created uses the function
listitem(listsort([Artist]),0)Breaking that down, there are two functions being applied:
listitem( ,0)listsort([Artist])Working backwards,
listsort([Artist]) is a function which sorts all values inside a list field. So that sorts BBB; AAA; CCC to AAA; BBB; CCC. You can change [Artist] to any other field.
And
listitem( ,0) picks out a specific item from a list. Expressions start counting from 0 rather than 1, so 0 is the first item in the list.
Now if we just used
listitem([Artist],0) and gave it: AAA; BBB, it will return AAA
But if you send that BBB; AAA, it will give you BBB - because that is the first item in the list.
If you used
listitem([Artist],1) and the artist field has AAA; BBB; CCC it would return BBB, because that is second in the list.
So you combine the two functions together - you sort the list first, and then you pull out the first value from that sorted list:
listitem(listsort([Artist]),0)This way it is only actually comparing the first item in your list.
So if you have:
- AAA; BBB; CCC
- BBB; AAA
- CCC; BBB; AAA
- AAA
It's sorting them all to read:
- AAA; BBB; CCC
- AAA; BBB
- AAA; BBB; CCC
- AAA
And then only comparing the first value from each list to see if they are a match.
In this example, the first artist is AAA for all of them, so those are all considered duplicates.
I thought this might be better when you're actually looking for duplicate files, because otherwise it might miss some if the duplicate tracks have a different number of artists listed on them.
If you only sorted the list and compared them, only 1 & 3 would be considered duplicates, because you're checking to see if the whole list matches, rather than a partial match.