INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: New Feature Request - Sorting by Last Name?  (Read 1494 times)

jondavis

  • World Citizen
  • ***
  • Posts: 132
New Feature Request - Sorting by Last Name?
« 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?

Logged

timwtheov

  • Galactic Citizen
  • ****
  • Posts: 354
Re: New Feature Request - Sorting by Last Name?
« Reply #1 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 . . . .
Logged

swiv3d

  • Guest
Re: New Feature Request - Sorting by Last Name?
« Reply #2 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.
Logged

jondavis

  • World Citizen
  • ***
  • Posts: 132
Re: New Feature Request - Sorting by Last Name?
« Reply #3 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.
Logged

swiv3d

  • Guest
Re: New Feature Request - Sorting by Last Name?
« Reply #4 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.
Logged

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3119
Re: New Feature Request - Sorting by Last Name?
« Reply #5 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.
Logged

jondavis

  • World Citizen
  • ***
  • Posts: 132
Re: New Feature Request - Sorting by Last Name?
« Reply #6 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?
Logged

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3119
Re: New Feature Request - Sorting by Last Name?
« Reply #7 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.
Logged

timwtheov

  • Galactic Citizen
  • ****
  • Posts: 354
Re: New Feature Request - Sorting by Last Name?
« Reply #8 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).
Logged

jeh14

  • Junior Woodchuck
  • **
  • Posts: 51
Re: New Feature Request - Sorting by Last Name?
« Reply #9 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.
Logged

AndyU

  • Galactic Citizen
  • ****
  • Posts: 363
Re: New Feature Request - Sorting by Last Name?
« Reply #10 on: August 20, 2018, 01:51:16 am »

Not to mention London Wainwright III or Sammy Davis Jr or Jay Z ..

Logged

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3119
Re: New Feature Request - Sorting by Last Name?
« Reply #11 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.

Logged

AndyU

  • Galactic Citizen
  • ****
  • Posts: 363
Re: New Feature Request - Sorting by Last Name?
« Reply #12 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?
Logged

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3119
Re: New Feature Request - Sorting by Last Name?
« Reply #13 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.
Logged

jondavis

  • World Citizen
  • ***
  • Posts: 132
Re: New Feature Request - Sorting by Last Name?
« Reply #14 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.
Logged
Pages: [1]   Go Up