INTERACT FORUM

Please login or register.

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

Author Topic: Changing artist listing from first to last name  (Read 6584 times)

seric56

  • Recent member
  • *
  • Posts: 11
Changing artist listing from first to last name
« on: September 23, 2014, 10:23:35 pm »

How do I change artist listing format in my liberary from first name to last name? ie Bob Dylan should ben under D for Dylan, not B for Bob.  Thanks
Logged

BartMan01

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1513
Re: Changing artist listing from first to last name
« Reply #1 on: September 23, 2014, 10:55:00 pm »

The way I do it is having a custom field called 'Artists' that is a multiple entry field, then I enter all of the artists for that track in last, first format.  If there are multiple artists on a track, I enter them all.  Then I replace the 'Artist' field with the 'Artists' field in any view/smartlist/etc. that I need it.

Track = Poncho & Lefty
Artist = Willie Nelson & Merle Haggard
Artists = Nelson, Willie; Haggard, Merle

If I ask for tracks by 'Nelson, Willie', that song shows up in the list.
If I ask for tracks by 'Haggard, Merle', that song shows up in the list.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Changing artist listing from first to last name
« Reply #2 on: September 23, 2014, 11:01:37 pm »

Search for my username and Artist Name Swap.
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: Changing artist listing from first to last name
« Reply #3 on: September 24, 2014, 03:09:30 pm »

There is a standard tag called ArtistSort which some rippers will rip - might first be worth checking if your rips have it set. If they do you can use it, otherwise I'd add a tag of that name, set it manually or with some smart programming, and then make sure it is ripped in the future. You can use such an ArtistSort tag to control the sort order of a view which uses the Artist tag; Bob Dylan can stay as Bob Dylan, and get displayed as Bob Dylan.

p.s. There are also ComposerSort and AlbumArtistSort tags - dBPoweramp will rip them; don't know about MC.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Changing artist listing from first to last name
« Reply #4 on: September 24, 2014, 09:39:22 pm »

I looked it up for you:

http://yabb.jriver.com/interact/index.php?topic=78210.0

Keep reading down.  MrC provided a nice expression that swaps names around, and even properly handles a bunch of common suffixes (Jr., Sr, III, etc).

You can, if you want, make your own [ArtistSort] field and apply an expression like that to it, and then sort on that field instead of [Artist].  I don't do that though, because it is very troublesome with band names.  I want to turn Tori Amos into Amos, Tori, but I don't want to turn Arcade Fire into Fire, Arcade.  So, instead I just fix the [Artist] tag itself to use last-name-first format, because I'm a human and I can tell the difference between a band name and a person's name (usually, sometimes I have to look them up on Wikipedia).

To do this easily, I have a custom expression field called [Artist Name Swap] defined, with this expression in it:

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

So, then, if I want to change a set of files that all have "Hank Williams Jr." set as the Artist, I just select them all, and type:
=[Artist Name Swap]
into the Artist field in the Tag Action Window.  Presto-chango, they're all fixed.
Logged
"Some cultures are defined by their relationship to cheese."

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

BartMan01

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1513
Re: Changing artist listing from first to last name
« Reply #5 on: September 24, 2014, 10:47:51 pm »

Thanks for pointing to that post.  I still prefer my 'Artists' field for it's ability to track multiple artists but this will save me lots of time typing them in for new albums.

I also missed that you could use =[Fieldname] when editing directly on screen.  That will also save me a ton of clicks for copying standard fields to custom fields. 

Learn something new every day....
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Changing artist listing from first to last name
« Reply #6 on: September 25, 2014, 12:33:13 am »

Yeah!  You can do =[Any Expression] anywhere you can edit the value of a field (so both in the Tag Action Window, or inline in the file details view).  This is, of course, most useful when you can do the same operation to multiple files.  Anywhere you are hand-editing things in a repetitive fashion, you can almost certainly get there quicker using the Find & Replace tool, the Fill Properties from Filename tool, or using expressions inline.

It is particularly handy for doing text manipulation.  You can use all of the String Manipulation Functions.  I use RemoveLeft, RemoveRight, and Replace functions all the time to trim existing values of needless dreck.

You can, of course, reference the very field you're editing, so if you have a bunch of files that end up with this in the [Name] field:
Track04-The name of the song
Track05-The name of this song
Track06-The name of yet another song


You can get the track numbers easily enough by sorting them and doing Fill Track Number from List Order.

But to get that needless dreck out of the [Name] field, you can select them all and do:
Code: [Select]
=RemoveLeft([Name], 8)
And, you can reference other fields to insert their values too.  You can replace the entire contents of the current field, or combine the two.  Say for example you want to do the reverse of the example above, and make the [Name] field contain that annoying spaceless Track Number dash prefix? (you probably wouldn't, but just as an example):
Code: [Select]
=TrackPadNumber([Track #], 2)-[Name]
Any text you enter that isn't recognized as a Function or Field is passed through untouched.  So, that becomes "Track04-The name of the song" once again.

It is handy for numbering things too.  MC has a Fill Track Numbers from List Order right-click function.  But what if you want to do the same in the [Episode] field, or some other field?  You can edit the [Episode] tag for a selection of files, and do:
Code: [Select]
=Counter()
MC can even do Regular Expressions, so you can get truly crazy if you're a huge nerd, and they all work for "renaming" any field inline or in the Tag AW.
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: Changing artist listing from first to last name
« Reply #7 on: September 25, 2014, 01:12:35 am »

And, as I described above, if you have a complicated expression built (like MrC's crazy name-swapping RegEx above) that you use all the time, you can just make it into a custom Expression Field, and use it like a "favorite" or "shortcut" to the longer expression.

You could, if you were a masochist, enter that crazy RegEx expression itself inline with an equals sign, and it would do the same thing.  But then you'd have to store them in a Notepad file or whatever.  No need.  Just go to Tools > Options > Library & Folders > Manage Library fields and add a new Expression-Type field and give it a name.  Then you can just use =[My Saved Expression's Name] instead of typing the whole thing all the time.
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: Changing artist listing from first to last name
« Reply #8 on: September 25, 2014, 01:22:34 am »

Oh yeah, I should mention... I know this feature well because, well...

Liberace Rubber Chіcken

Oh, and because...
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: Changing artist listing from first to last name
« Reply #9 on: September 25, 2014, 02:44:34 am »

Oh yeah, I should mention... I know this feature well because, well...

Liberace Rubber Chіcken

Oh, and because...

Did you ever get the "wild cards" Glynor? That would be great, and if they exist I missed something
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Changing artist listing from first to last name
« Reply #10 on: September 25, 2014, 12:31:11 pm »

Better. We got RegEx.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/
Pages: [1]   Go Up