INTERACT FORUM

More => Old Versions => JRiver Media Center 24 for Windows => Topic started by: jondavis on August 17, 2018, 02:06:21 pm

Title: New Feature Request - Sorting by Last Name?
Post by: jondavis on August 17, 2018, 02:06:21 pm
If you go to tools - options - Tree & View - Sorting - Ignore Articles
So yea thanks for getting rid of "a”, “an” and “the" before an Artist name.

What I would like to have added is:
Either in that same section - you would have to enter the artist name
or on a right click on the artist name
to have it so you can Ignore Name/Word - while sorting

So if you have Jon Bon Jovi - you could ignore Jon and it would sort by just Bon Jovi
or if you have Axel Rudi Pell - you could ignore both Axel and Rudi and sort by Pell
yes you would have to enter in which words to ignore

Please it would help in sorting out these lists?

Title: Re: New Feature Request - Sorting by Last Name?
Post by: timwtheov on August 17, 2018, 02:57:12 pm
You can probably do this with one of the expressions in this thread: https://yabb.jriver.com/interact/index.php?topic=78210.0

Try creating a custom field as is said in one of the posts in this thread (from Glynor, if memory serves) like [Artist Name Swap] in Tools>Options>Library & Folders>Manage Library Fields>Add New Field, and when you do so make sure you make it a "Calculated Data" type and then paste the appropriate expression from the above thread in there. Then you can use that field in whatever view you want.

However, there is a little glitch with accents in the most recent Windows version of MC (24.0.46), though it probably won't affect you unless you have some Czech names with a bunch of different accents in them. I'm going to make a post about this in a moment . . . .
Title: Re: New Feature Request - Sorting by Last Name?
Post by: swiv3d on August 17, 2018, 05:13:18 pm
So if you have Jon Bon Jovi - you could ignore Jon and it would sort by just Bon Jovi
or if you have Axel Rudi Pell - you could ignore both Axel and Rudi and sort by Pell
yes you would have to enter in which words to ignore
If you think about it what you are asking is for the sort procedure to read your mind as to your personal preferences. How would it know to sort Jon Bon Jovi differently from Axel Rudi Pell as they have the same structure. Better for you would be to create a a library field called sort-name, fill it with =swap([Artist]) and then amend the few odd cases by hand.
Title: Re: New Feature Request - Sorting by Last Name?
Post by: jondavis on August 18, 2018, 01:07:58 am
If you think about it what you are asking is for the sort procedure to read your mind as to your personal preferences. How would it know to sort Jon Bon Jovi differently from Axel Rudi Pell as they have the same structure. Better for you would be to create a a library field called sort-name, fill it with =swap([Artist]) and then amend the few odd cases by hand.

The easiest way to explain it, would be to right click on Jon Bon Jovi and select "Exclude" and then you get to type in whatever you want - in this case - Jon
Then I scroll down and right click on Axel Rudi Pell and select "Exclude" and in this case I type in two words - Axel, Rudi
So in either case when it comes to those names it knows what to exclude
Yes I would have to do this for every artist that is listed with first, last name but at least its something to work with.
I'm not asking it to sort things by itself.
Title: Re: New Feature Request - Sorting by Last Name?
Post by: swiv3d on August 18, 2018, 05:24:40 am
If you create a new library field as I suggested you could then sort by that and get what you want. I doubt if this kind of sort modification would be high on the list of desirable improvements.
Title: Re: New Feature Request - Sorting by Last Name?
Post by: dtc on August 18, 2018, 09:06:05 am
The standard way to do this is to create two new tags like Artist Sort and Artist Sort Manual. If you want to use a straight swap leave Artist Sort Manual blank. If you want to override the automatic swap, put your specific name in Artist Sorted Manual. Then Artist Sorted is a calculated field that uses swap if Artist Sorted Manual is blank and uses its value if it is not blank.  This method means you only have to make entries for the exceptions, which are typically a small percentage of your artists.  Unfortunately determining which artist to override the swap is a manual process. But there is no foolproof way to avoid that.  Do you want The Beatles to sort as  Beatles, The or The Beatles. Only you can determine that.
Title: Re: New Feature Request - Sorting by Last Name?
Post by: jondavis on August 19, 2018, 06:51:42 pm
You can probably do this with one of the expressions in this thread: https://yabb.jriver.com/interact/index.php?topic=78210.0

Try creating a custom field as is said in one of the posts in this thread (from Glynor, if memory serves) like [Artist Name Swap] in Tools>Options>Library & Folders>Manage Library Fields>Add New Field, and when you do so make sure you make it a "Calculated Data" type and then paste the appropriate expression from the above thread in there. Then you can use that field in whatever view you want.

However, there is a little glitch with accents in the most recent Windows version of MC (24.0.46), though it probably won't affect you unless you have some Czech names with a bunch of different accents in them. I'm going to make a post about this in a moment . . . .

Ok, tried this and yea anyone with a First - Last name got switched. Thanks
But Jon Bon Jovi sorted by Jovi instead of Bon
while
Axel Rudi Pell did sort correctly by using Pell

I'm guessing with 3 word names I'm stuck to use either the second or third name to sort with.
Correct?
Title: Re: New Feature Request - Sorting by Last Name?
Post by: dtc on August 19, 2018, 08:38:28 pm
The SWAP function basically implemented the expression from that thread. in doing that, it was acknowledged that it did the swap without any understanding of context. This is exactly what you are seeing, either using the swap function or Mr C's expression

Its not just 3 names artist that have problems. 2 name and 4 name and 5 name artists will also have problems. There is no general solution.  What do you do with "Kathleen Turner Overdrive"?

Look at what I posted. That is the solution.  You need to manually intervene to be sure swapping always works as you want it to.
Title: Re: New Feature Request - Sorting by Last Name?
Post by: timwtheov on August 19, 2018, 10:20:20 pm
Which expression on that thread I linked to did you use? This one?

if(!regex([Composer], /#^([^,]+)\s+([^,]*?)$#/),
   [Composer],
   regex(listclean([Composer], 2, / ),
         /#^(?:(I+|[JS]r\.?)\s+)?(\S+)(.*)$#/, -1)[R2]/,/ listclean([R3], 2, / )[R1]
)

I ask because I use this in my [Composer Name Swap] custom field for classical, where there are loads of composers with three+ names (Ludwig van Beethoven, Wolfgang Amadeus Mozart, etc.), and I've not seen ANY not show right in my main classical views, e.g., "Beethoven, Ludwig van" or "Mozart, Wolfgang Amadeus." The expression even gets "Strauss, Johann I" and "Strauss, Johann II" right. Obviously it wouldn't work for band names, as dtc said, and probably not multiple artists in the same field delimited by semicolons (though I bet someone on here could tweak the expression to deal with that), so there'd definitely be some manual tagging involved; but I think the above should work for nearly all names (of course you'd need to substitute [Artist], or whatever field you want, for [Composer] in the expression).
Title: Re: New Feature Request - Sorting by Last Name?
Post by: jeh14 on August 20, 2018, 01:28:25 am
A major problem with anything like this being done automatically is "artist names" that aren't people's names. For example, I would not want either "London Symphony Orchestra" or "Steve Miller Band" sorted by the last word in the name.
Title: Re: New Feature Request - Sorting by Last Name?
Post by: AndyU on August 20, 2018, 01:51:16 am
Not to mention London Wainwright III or Sammy Davis Jr or Jay Z ..

Title: Re: New Feature Request - Sorting by Last Name?
Post by: dtc on August 20, 2018, 07:28:36 am
Define 2 new tags as strings : [Artist Sort] and [Artist Sort Manual] with [Artist Sort] defined as a calculated field

[Artist Sort] calculated as FirstNotEmpty([Artist Sort Manual],swap[Artist])


[Artist Sort] will be the swap of [Artist] unless you manually put a value into [Artist Sort Manual]

If you think Mr C's expression is better than swap, then use it in place of swap[Artist] in the calculated field.  I think swap includes all the bells and whistles of that expression, but maybe not. I started using that expression before swap was added and still use it.

Title: Re: New Feature Request - Sorting by Last Name?
Post by: AndyU on August 20, 2018, 07:59:21 am
Define 2 new tags as strings : [Artist Sort] and [Artist Sort Manual] with [Artist Sort] defined as a calculated field

[Artist Sort] calculated as FirstNotEmpty([Artist Sort Manual],swap[Artist])


[Artist Sort] will be the swap of [Artist] unless you manually put a value into [Artist Sort Manual]

If you think Mr C's expression is better than swap, then use it in place of swap[Artist] in the calculated field.  I think swap includes all the bells and whistles of that expression, but maybe not. I started using that expression before swap was added and still use it.

Trouble with that is every time you rip a new cd you have to decide whether the Artist Sort is correct, and if not set Artist Sort Manual, which might be different for each track. Tedious, and repetitive. Surely it would be better to only to have to enter your preferred Artist Sort value once per Artist. (Or  Composer Sort, Album Sort...). And what happens if you have a list of Artists, Soloists, etc. how would your scheme give each of the entries in such a list their own sort value?
Title: Re: New Feature Request - Sorting by Last Name?
Post by: dtc on August 20, 2018, 08:12:56 am
Yes it can be tedious, but, at least for me, the exceptions are not very common. And, once you are aware of the issue, it becomes second nature when ripping. Now, if you are using auto import for dozens of albums on a regular basis, it is a more complicated process.

If you have a way to maintain a list of artists and their preferred sort form that can be used throughout MC, that would be great. I have always wanted such a feature, but I do not expect JRiver to implement such a feature, but who knows. Until then, I use my simply manual system, as do many others.
Title: Re: New Feature Request - Sorting by Last Name?
Post by: jondavis on August 20, 2018, 10:36:39 pm
Which expression on that thread I linked to did you use? This one?

if(!regex([Composer], /#^([^,]+)\s+([^,]*?)$#/),
   [Composer],
   regex(listclean([Composer], 2, / ),
         /#^(?:(I+|[JS]r\.?)\s+)?(\S+)(.*)$#/, -1)[R2]/,/ listclean([R3], 2, / )[R1]
)

I ask because I use this in my [Composer Name Swap] custom field for classical, where there are loads of composers with three+ names (Ludwig van Beethoven, Wolfgang Amadeus Mozart, etc.), and I've not seen ANY not show right in my main classical views, e.g., "Beethoven, Ludwig van" or "Mozart, Wolfgang Amadeus." The expression even gets "Strauss, Johann I" and "Strauss, Johann II" right. Obviously it wouldn't work for band names, as dtc said, and probably not multiple artists in the same field delimited by semicolons (though I bet someone on here could tweak the expression to deal with that), so there'd definitely be some manual tagging involved; but I think the above should work for nearly all names (of course you'd need to substitute [Artist], or whatever field you want, for [Composer] in the expression).

Yea I switched to the code you have above from a shorter one.
Also I was leaving Jon Bon Jovi as is in the Composer field, I needed to change it to Bon Jovi, Jon. I see how it works now.
Thanks for the help.