INTERACT FORUM

Please login or register.

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

Author Topic: Artist Lists & Renaming Expressions  (Read 1054 times)

darichman

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1363
Artist Lists & Renaming Expressions
« on: May 16, 2012, 11:53:56 pm »

Now that [Artist] is a list type field, if you use [Artist] in any part of a rename expression, the output will use only the first artist in the list if there are more than one. I think this is appropriate default behaviour.

What I'd like to do is use an expression that will output the artists in full, ideally separated by a comma-space.
   Eg. [Artist]=Barbra Streisand; Kris Kristofferson    outputs to   Barbra Streisand, Kris Kristofferson

The replace expression is easy enough, but the MC rename process is not passing the second artist instance through to the expression from what I can tell.
   Eg. [Artist]=Barbra Streisand; Kris Kristofferson    outputs to   Barbra Streisand

I used to use a [Format Artist] calculated field to strip or replace characters unsupported by the windows file system. It also replaced ";" with "," for the purposes of renaming the files (could probably be simpler with Regex, I know!):

Code: [Select]
replace(replace(replace(replace(replace(replace(replace([Artist],Multiple Artists,Various),?,),:,/,),//,-),",’),*,●),;,/,)
This expression still works fine within the program (eg pasting into another field, or just by viewing the [Format Artist] field in any column or view).
Eg. Barbra Streisand; Kris Kristofferson    >    Barbra Streisand, Kris Kristofferson

I seem to be hitting a wall, however, when I want to use it in rename expressions.

Any ideas (apart from deleting that particular album from my library :D)?
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Artist Lists & Renaming Expressions
« Reply #1 on: May 17, 2012, 12:14:03 am »

Did you try:

Replace([Artist,0], ;, /,)

This is the Raw field format, so you'll get the entire list (i.e. string) in Rename, Copy & Move.
Logged
The opinions I express represent my own folly.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Artist Lists & Renaming Expressions
« Reply #2 on: May 17, 2012, 12:16:42 am »

See my shorter/easier Cleaning solution here:

http://yabb.jriver.com/interact/index.php?topic=72146.msg488144#msg488144

You'll likely want to change XXX as per note in the follow-up responses.
Logged
The opinions I express represent my own folly.

darichman

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1363
Re: Artist Lists & Renaming Expressions
« Reply #3 on: May 17, 2012, 12:33:46 am »

Thanks MrC - worked a treat. I didn't know about that one. I like my clumsy one because I replace some characters with other characters, rather than a sweeping 'replace all with _ or -'. At any rate, once it works I just store it in a custom field and forget about it... I can just use that field in any subsequent expressions :)

Thanks (once) again for your timely and useful advice.
Logged
Pages: [1]   Go Up