INTERACT FORUM

Please login or register.

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

Author Topic: Remove Articles from End?  (Read 1939 times)

Chico

  • Regular Member
  • World Citizen
  • ***
  • Posts: 136
  • Life is good!
Remove Articles from End?
« on: July 16, 2009, 03:14:05 pm »

You have an option in the library tools/clean file properties, Move Articles to End where The first word is move to the end with a comma inserted.  Any chance a tool can be generated that does the opposite?  I have over 3000 files with the first name last (ie. Jovi, Bon).  Is there a tool or can one be made to undo this?  Just something that moves the first word after the comma to the front, add a space and remove the comma.
Logged
JRiver Media Center... If you don't have it, I don't want to hear it!

gappie

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 4566
Re: Remove Articles from End?
« Reply #1 on: July 16, 2009, 03:27:39 pm »

you could use an expression to do this. with expressions , better make a backup first and try with one file only.


now in the tag window , or with F2 in details put this in the artist tag
Code: [Select]
=Clean(listitem([artist],1,/,) listitem([artist],0,/,))
does it work, also check if there are no artists names where there are two ",".

 :)
gab
Logged

phalanthus

  • Galactic Citizen
  • ****
  • Posts: 461
Re: Remove Articles from End?
« Reply #2 on: July 16, 2009, 07:47:32 pm »

wouldn't find and replace be simpler ?- find "bloggs fred" and replace with "fred bloggs ? "
Logged

fitbrit

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4877
Re: Remove Articles from End?
« Reply #3 on: July 16, 2009, 08:04:46 pm »

wouldn't find and replace be simpler ?- find "bloggs fred" and replace with "fred bloggs ? "

I don't think Bon Jovi released 3000 songs, I'm guessing there are tens if not hundreds of Fred Bloggses with different names.
Logged

Chico

  • Regular Member
  • World Citizen
  • ***
  • Posts: 136
  • Life is good!
Re: Remove Articles from End?
« Reply #4 on: July 19, 2009, 09:32:43 am »

wouldn't find and replace be simpler ?- find "bloggs fred" and replace with "fred bloggs ? "
That would work if they were all the same artist as fitbrit eluded to.
I did a search of artists name containing a "," and found over 5000 with a comma.  However, as gappie mentioned, watch out for artists names like Crosby, Stills, Nash and Young, where commas are needed.  After weeding these types of names, I've over 3000 with the first name last.
I'll try gappies idea!  If it can be done with out much coding, it would be a nice feature to have in the basic program.
Thanks for the replies!
Logged
JRiver Media Center... If you don't have it, I don't want to hear it!

Chico

  • Regular Member
  • World Citizen
  • ***
  • Posts: 136
  • Life is good!
Re: Remove Articles from End?
« Reply #5 on: July 19, 2009, 11:30:23 am »


Code: [Select]
=Clean(listitem([artist],1,/,) listitem([artist],0,/,))

Gab,
That worked perfectly!  I was able to rearrange all 3000+ artist ID Tags in well under an hour!    ThanX!

Now, can you please explain how that code in the artist field worked?  How does changing ([artist],1,/,) to ([artist],0,/,) move the name after the comma to the front and remove the comma? 

Thanks,
Chico
Logged
JRiver Media Center... If you don't have it, I don't want to hear it!

gappie

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 4566
Re: Remove Articles from End?
« Reply #6 on: July 19, 2009, 04:56:58 pm »

Gab,
That worked perfectly!  I was able to rearrange all 3000+ artist ID Tags in well under an hour!    ThanX!

Now, can you please explain how that code in the artist field worked?  How does changing ([artist],1,/,) to ([artist],0,/,) move the name after the comma to the front and remove the comma? 

Thanks,
Chico
great that it worked.
 8)
are you familiar with the wiki for the expressions? http://wiki.jrmediacenter.com/index.php/Media_Center_expression_language

as you can see i use the listitem expression two times, in the wiki it says:
Quote
ListItem(...): Use to return a value from a delimited list
List: List
Index: Index (starts at 0)
Delimiter: Delimiter (optional -- defaults to semi-colon)

in the "jovi, bon" case i use the "," as the delimiter. since the "," is also a sign used by the expressions it self i have to put a / in front of it, so it is recognized as a delimiter ( in this case).
so you can read this: listitem([artist],1,/,) listitem([artist],0,/,) as
from the with , delimited list return the second value put a space and return the first value.
the comma is not returned and i use the clean to get the spaces at the start away.

hope that this explenation is clear?

together with an if statement and the IsEqual and ListCount expression it should be possible to make an expression that would only change the order of the names with only one comma
 :)
gab
Logged

Chico

  • Regular Member
  • World Citizen
  • ***
  • Posts: 136
  • Life is good!
Re: Remove Articles from End?
« Reply #7 on: July 19, 2009, 05:29:47 pm »

Thanks Gab!
I'll have to read up on the expression language.
Logged
JRiver Media Center... If you don't have it, I don't want to hear it!
Pages: [1]   Go Up