INTERACT FORUM

Please login or register.

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

Author Topic: Sort Artist by Family Name  (Read 9325 times)

rbj

  • Guest
Sort Artist by Family Name
« on: March 28, 2016, 02:54:44 pm »

How can I get JRiver to sort by family name (Mick Jagger under J not M and Wolfgang Amadeus Mozart under M not W).
This works perfectly in Groove
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42444
  • Shoes gone again!
Re: Sort Artist by Family Name
« Reply #1 on: March 28, 2016, 05:06:11 pm »

I thought you needed to add an expression column with the Swap(...) effect and sort that.

Use, as an example:
Swap([Artist])
Logged
Matt Ashland, JRiver Media Center

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Sort Artist by Family Name
« Reply #2 on: March 29, 2016, 12:13:53 pm »

I have thoughts on this that I've been meaning to write up. But I'm busy now. Bump this thread if I don't respond in a few days.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Arindelle

  • Citizen of the Universe
  • *****
  • Posts: 2772
Re: Sort Artist by Family Name
« Reply #3 on: March 29, 2016, 01:58:59 pm »

I have thoughts on this that I've been meaning to write up. But I'm busy now. Bump this thread if I don't respond in a few days.

hahah ... same.

lots of new (and older ;) ) posts on this subject. Time to think of making sort fields as default, out-of-the-box,  ones??
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Sort Artist by Family Name
« Reply #4 on: March 29, 2016, 02:52:49 pm »

I'm thinking the same, but I've recently implemented a full system for this (finally replacing my "tag [Artist] as Lastname, Firstname manually" method). I haven't finished actually converting to the new system yet, though, so I'd like to let it settle a bit before explaining.

It is, essentially, a tweaked version of something we'd discussed before.

I think JRiver should just implement it by default. It is just a couple expression fields and one checkbox field, and it works brilliantly.  Plus, since it is just database stuff, won't hurt anything if the users don't need it and ignore it.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

AndyU

  • Galactic Citizen
  • ****
  • Posts: 363
Re: Sort Artist by Family Name
« Reply #5 on: March 29, 2016, 04:13:50 pm »

I'm thinking the same, but I've recently implemented a full system for this (finally replacing my "tag [Artist] as Lastname, Firstname manually" method). I haven't finished actually converting to the new system yet, though, so I'd like to let it settle a bit before explaining.

It is, essentially, a tweaked version of something we'd discussed before.

I think JRiver should just implement it by default. It is just a couple expression fields and one checkbox field, and it works brilliantly.  Plus, since it is just database stuff, won't hurt anything if the users don't need it and ignore it.

Does it deal with Japanese names, where the family name is first? And does it make McAdams come before MacAndrews and Masters(which is the convention in the UK)? And does it make Quincy Jones sort to Q?!
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Sort Artist by Family Name
« Reply #6 on: March 29, 2016, 06:27:55 pm »

Does it deal with Japanese names, where the family name is first?

Yes.

And does it make McAdams come before MacAndrews and Masters(which is the convention in the UK)?

No. That's loony.

You could probably pull it off if you were very determined, but you'd be building a towering Rube Goldberg contraption and it would be ill-advised. Sorting is still ascii-betical with some smart number handling (leading zeroes and the like).

And does it make Quincy Jones sort to Q?!

No. Well, it could, but it also could make it sort to J. You just add a switch.

I'll write it up later tonight.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Otello

  • World Citizen
  • ***
  • Posts: 204
Re: Sort Artist by Family Name
« Reply #7 on: March 29, 2016, 07:20:17 pm »

Ehm, I'm just curious: how are you addressing the problem on unwanted swaps?
For instance, "Amadeus Quartet", or "Pink Floyd", shouldn't be swapped.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Sort Artist by Family Name
« Reply #8 on: March 29, 2016, 11:22:53 pm »

Alright... I've explained most of this before, but this is probably a better place anyway. I'm going to start off with two simpler examples (which I'm actually using), and then move on to [Artist].

Swapping Proper Name Lists

Because [Artist] will typically contain a mixture of proper names and "band names" (and other exceptions to the rule) it a more complicated case to solve. However, there are other fields in MC that contain proper name lists, and in many of these cases it would be more convenient to use these fields as View Categories in Lastname, Firstname format. Two good examples are [Director] and [Actors].

Because these fields are:
* Not mixed with non-proper name values
* Typically not tagged manually (filled by Automatic Metadata Lookup instead)
* TVDB and TMDB both fill these with values in Firstname Lastname format.

They are a great candidate for a simplified version of this system. Basically, you're just going to use an expression in place of the actual fields as the category. You can do this either by adding an Expression Category to a View directly, or if you'll use it over and over in different Views, it'll be easier to add an Expression type Field instead.  I prefer the latter in most cases.

Create a new Library Field called Director (Swapped) and set it up like so:

Click to embiggen.


Use this expression:
Code: [Select]
Swap([Director])&datatype=[list]
You can create a similar [Actors (Swapped)] using this expression:
Code: [Select]
Swap([Actors])&datatype=[list]
You could do the same for other similar fields. I only use these two, but if I was going to use [Screenwriter] as a filter on a view ever, then I'd make a corollary for it like this as well.

Then, in any Media View where you've used [Actor] or [Director], you simply substitute in your Swapped version instead. Done. It will behave just like the original except the name will always be swapped.

The main problem with this method is that you can't use these Categories for tagging (because you can't assign a value to an expression). So, that means they don't work well in a Panes style View (if you do tagging in the panes a lot, as I do).  But for browsing in a Categories style View, Theater View, or Media Network Views, they work quite well. And for these particular fields, the values are almost always (at least for me) assigned automatically from TMDB or TVDB. And, if I'm resorting to tagging them manually anyway, then typing the values in the Tag AW (rather than using pane tagging) isn't a huge hardship.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Sort Artist by Family Name
« Reply #9 on: March 30, 2016, 12:08:11 am »

Swapping Mixed Name Lists

As mentioned above, dealing with [Artist] is a bit more challenging, but really quite straightforward in concept. You do the exact same thing, except this time you add in a Checkbox field that lets you turn the swapping function on and off, on a per-Artist basis. Then, you add an [Artist (Smart)] field that has an expression that displays the Artist value either Swapped or Normal, depending on if that box is checked.

Toggle Field

Add a new field called Artist Swap Toggle and configure it like this:

Again with the embiggen.


Note that the Relational setting is set to Store one value for each artist. That makes it so if you check (or uncheck) this box for one file of a particular [Artist], it applies automatically to all imported files with that same Artist value.

For the Display Name, you can name it based on how you'd like this toggle to behave, because it can work either way depending on your preference. In other words, when the box is unchecked, do you want the default behavior to be to Swap the value of [Artist] or to pass it through normally? I'd recommend you pick which way you go based on the more common case in your Library. When new files are imported fresh, this custom [Artist Swap Toggle] field will come in with a value of 0 (unchecked). So make that the more common result for you. Then, in the Display boxes, you can put in something like Swap Artist Name or Don't Swap Artist (or something that makes sense for how you have it set up).

Smart Artist Replacement

Once you have this toggle field, you can make the smart [Artist] replacement. Create a new field called [Artist (smart)], or perhaps [Album Artist (auto smart)] or something that works for you, and configure it like so:


If you want an unchecked Toggle to swap the Artist value, then use this expression:
Code: [Select]
If([Artist Swap Toggle],[Artist],Swap([Artist]))&datatype=[list]
If you want it to work on the output of [Album Artist (auto)] instead, then use this instead:
Code: [Select]
If([Artist Swap Toggle],AlbumArtist(),Swap(AlbumArtist()))&datatype=[list]
If you want it to swap the Artist value only when the toggle is checked, then just reverse the order of the If() statement's results like:
Code: [Select]
If([Artist Swap Toggle],Swap([Artist]),[Artist])&datatype=[list]
Lastly, display the Toggle field in a column in your Views (and in the Tag Action Window) so that you can enable and disable it as needed, and replace [Album Artist (auto)] or [Artist] as the category you use in each of your Media Views with the new [Artist (smart)] field.

Any time you need to disable the swapping behavior, you can do it by simply checking or unchecking that box. If the swapping works correctly, great. If not, turn it off and pass the regular value through. And, because the toggle is a relational field, you only need to check (or uncheck) the box once per Artist, and the same value will apply to all other files by that same Artist automatically (even ones imported in the future).

Tagging On Import

You can add even more advanced logic to this if you want. For example, you could add a Regex() pass if you were into it, that looked for things like ampersands or other character patterns that should never trigger the swapping logic.

I'd probably keep the smart field relatively simple, and do things like that in a Tag on Import rule instead.  In a Tag on Import rule, you could check to see if the current [Artist] string starts with "The " or "A ", contains an ampersand, or other special characters unlikely to be part of a proper name. If so, check the Toggle box (or make it unchecked as needed).
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Sort Artist by Family Name
« Reply #10 on: March 30, 2016, 12:12:03 am »

Hope this makes sense.  As mentioned above, the main downside to this system is that you can't tag them in the Panes anymore. I've long used this system for [Actors] and [Director] but I hadn't moved to the fancier version with the toggle for [Artist] for this reason.

I'd pretty much decided to switch to this system for even [Artist]. I'd built it (hence the screenshots above). But, as I've written this and done more testing, I just don't like the value of this system enough to give up being able to use Panes to tag [Artist] simply.  I currently store all of my Artist values "manually swapped" (by me) where appropriate in the actual Tag value.

If I implemented this, I'd have to use special tagging views for tagging Music that are different from the ones I use for browsing, so that I could retain Pane Tagging.  It just isn't worth it to me. I already have all of my Library "properly swapped" except for those I haven't found lurking.  When I import new items, it doesn't take long to change [Artist] to =Swap([Artist]) as needed. While I do have plenty of special tagging Views, I don't do all of my music tagging in them, and I don't really want to have to...

So, for now, at least, I think I'm going to leave it as is on my Library. I'm not sure if I'll change my mind in the future.

But, despite that, I think this is a good system and I think JRiver should include these fields out of the box on new installs, at least for [Artist]. As I mentioned above, having the fields there doesn't hurt anything. If you don't want it, you can ignore it. But it would make it simpler for people to implement if the pieces were already there.

It would be even better if they could solve the editing problem. You can't do that with the expression language because you can't assign a value to an expression field. But, they could do it. It could just look at the checkbox value, and then "reverse swap" the edited value or not as needed, and store it in [Artist].

Still, even without solving the editing/tagging issue, it would be nice to just have the [Artist] related fields there as an example for new users.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

AndyU

  • Galactic Citizen
  • ****
  • Posts: 363
Re: Sort Artist by Family Name
« Reply #11 on: March 30, 2016, 12:17:31 pm »

There are plenty of classical works where the artists are both a person and a group. For example for a Mozart Clarinet Quintet I might have an Artistlist field as

Artistlist:David Shifrin;Emerson String Quartet

for which, if I have understood it right, your Artist Swap Toggle wouldn't deliver a sensible result.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Sort Artist by Family Name
« Reply #12 on: March 30, 2016, 11:26:36 pm »

Yes. In that case, if it couldn't be avoided, you'd have to toggle the auto-swapping off and store [Artist] for those tracks as: Shifrin, David;Emerson String Quartet. This works fine:

Click to embiggen.


The Artist value works correctly and still "groups" with its "auto-swapped" brother in the category properly.

Of course, with classical, there are lots of tagging strategies. You could instead consider using specific fields for those values instead. For example, use [Soloists] or [Performer] for David Shifrin. And then you can leave just the Quartet in [Artist] (or use [Band] or [Orchestra] or whatever you want).

One reason not to do that is to be able to find both David and the Quartet in the same category listing in MC (so you don't have to go through yet another "tier" of navigation). True, having both in [Artist] makes this easy.

But you're using an [Artist (smart)] expression to group the category anyway. That can be solved. You make your [Artist (smart)] field expression this instead:
Code: [Select]
RemoveCharacters(Delimit(If([Artist Swap Toggle],[Artist],Swap([Artist])),;)Delimit(Swap([Soloists]),;)Delimit(Swap([Performer]),;)Delimit(Swap([Composer]),;),;,2)&datatype=[list]
And, now, even if David is tagged in [Soloists] in one set of files, and as [Artist] in another, you get:

Click to embiggen.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

rbj

  • Guest
Sort Artist by Family Name
« Reply #13 on: April 02, 2016, 10:05:00 am »

It seem that Groove can do sorting of Artist according to family name, when will JRiver be able to do the same?
rbj
Logged

Arindelle

  • Citizen of the Universe
  • *****
  • Posts: 2772
Re: Sort Artist by Family Name
« Reply #14 on: April 02, 2016, 11:01:57 am »

I don't understand ... you just started the same post again as your first one ?

In your first post, Glynor even spent a great deal of time showing you one way how to do it (in reply to your post here http://yabb.jriver.com/interact/index.php?topic=104077.msg723497#msg723497).

So the answer is ; it can already if the sort tags are filled in ... there are some limitations when want to sort by LASTNAME, FIRSTNAME and display FIRSTNAME LASTNAME in Theater Mode views when having multiple Artists.

Or are you asking when JRiver will make it automatic ... if so we are discussing this in the thread that you started  ::)  Am I missing something here. Why start a new post?

No program can make it entirely automatic, unless the ripped sort data exists btw.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Sort Artist by Family Name
« Reply #15 on: April 02, 2016, 12:02:26 pm »

I merged them.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

rbj

  • Guest
Re: Sort Artist by Family Name
« Reply #16 on: April 26, 2016, 01:06:14 pm »

I started two postings because I'm not familiar the user interface of this forum, actually I just found the string of responses today :).
It would be very nice if this was an automatic feature made by JRiver, Firstly, I have just under 1800 ripped CDs, so automation is most welcome. Secondly, a central lookup database for how typical sorting of bands and Artists are done, would be better with multiple sources of data.
Classical and Rock have different needs. Personally I would like to use the Composer as the first sorting field (then conductor and orchestra), other user may have other preferences.
Logged
Pages: [1]   Go Up