INTERACT FORUM

Please login or register.

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

Author Topic: Question on sorting exceptions  (Read 824 times)

MajorCyco

  • Junior Woodchuck
  • **
  • Posts: 64
Question on sorting exceptions
« on: October 27, 2023, 08:21:34 pm »

I am trying to figure out if there is a way to grant an exception to sorting.

The Los Angeles Philharmonic Orchestra gets sorted under A as "Los" is an Article.  I can remove Los from the Tree & View/Sorting/Articles but then that changes other bands that use Los as an article in their name.  I can also Ignore Articles, but that moves a lot of bands that use "The" to T.

Currently the work around I am using is adding a "The" in front of "Los Angeles" as JRiver does not recognize the second article.

What I am trying to do is to see if there was a way that I can grant an exception... maybe a custom rule... to "Los Angeles" so that it would either ignore the "Los" or group "Los Angeles" to ignore the article in order to get sorted under L.  Thought I would solicit ideas.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Question on sorting exceptions
« Reply #1 on: October 28, 2023, 06:17:23 am »

You might want a custom sort field.  Here's how it would work:

[Artist Sort]

*  If you don't fill it out, it takes the value of [Album Artist (auto)]
*  If you do put a value in it, then it uses that value

That should allow you to use [Artist Sort] as your main sorting field and make exceptions as you see fit.  Note that you'll need to change the sorting of every view where you want to use this.  This includes JRemote views and TheaterView views.

To do this, you need to define a new field with an expression that does what I just described.  I can help you with the expression if this is something you would like to experiment with.

Brian.
Logged

MajorCyco

  • Junior Woodchuck
  • **
  • Posts: 64
Re: Question on sorting exceptions
« Reply #2 on: October 28, 2023, 07:54:42 pm »

Thank you for the assistance.  I am very open to experiment with this idea.

I created an Artist Sort field in Manage Library Fields.  I searched the Expression Language JRiverWiki for sorting, and I could definitely use some assistance on the expression language needed.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Question on sorting exceptions
« Reply #3 on: October 29, 2023, 08:51:18 am »

To do this, you actually need two new fields:

* Artist Sort Manual  :  This one is a plain string field.  This is where you will type your manual overrides.
* Artist Sort  :  This is the field you will use to do your actual sorting.  It will be a "calculated data" type.  The expression to use is:

Code: [Select]
FirstNotEmpty([Artist Sort Manual],[Album Artist (auto)])
It's pretty easy to use.  Just change your sorting field in all of your Artist type views to use Artist Sort.  Put any of your exceptions into [Artist Sort Manual].  It should all work as expected.

As an experiment with my own collection, I created these fields.  As I was looking for something to set manually, I remembered that I have albums by Miles Davis.  But I also have albums by "Miles Davis Quintet".   When looking through my Artist view, it's mildly annoying to see Miles Davis and Miles Davis Quintet, as I mostly think of them as the same thing (even though they aren't strictly the same artist, I consider them as one).

So, for the Miles Davis Quintet albums, I set [Artist Sort Manual] to "Miles Davis".  Then I changed my "Artists" view to use [Artist Sort] as the first category (instead of just [Artist]).  Voila'!  Now my Artists view groups Miles Davis and Miles Davis Quintet into a single artist for me! 

As you can see, this field can be used for several purposes that can make browsing your collection better and easier.

Best of luck,
Brian.
Logged

MajorCyco

  • Junior Woodchuck
  • **
  • Posts: 64
Re: Question on sorting exceptions
« Reply #4 on: November 07, 2023, 05:53:52 pm »

Thank you for the assistance.  I created the Artist Sort Manual and Artist Sort library views with no issue as well as adding the expression to the Artist Sort.  No issue with changing the view from Artist to Artist Sort.  Not sure how I set the exception in Artist Sort Manual for Los Angeles Symphony Orchestra like you did for Miles Davis.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Question on sorting exceptions
« Reply #5 on: November 07, 2023, 08:51:47 pm »

I'm not sure if Articles (the sorting option that removes articles) applies to all fields or not.  If it applies to the Artist Sort field, then you can put something into Artist Sort Manual like "Los Los Angeles Orchestra".  That way it only strips off the first "los" and still sorts by the correct name.  I would try to with the regular name first and see if it sorts under "L".  If it sorts under "A" instead, then try the "los los" version; that should sort correctly.

Brian.
Logged
Pages: [1]   Go Up