INTERACT FORUM

Please login or register.

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

Author Topic: Removing front end trash from Lyrics field  (Read 1883 times)

TXgary

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 498
  • I'm a llama!
Removing front end trash from Lyrics field
« on: July 28, 2015, 04:44:44 pm »

Can someone tell me how to remove (from multiple tracks) the trash that is getting put into my Lyrics tag field.
As an example:
');var c=function(){cf.showAsyncAd(opts)};if(window.cf)c();else{cf_async=!0;var r=document.createElement("script"),s=document.getElementsByTagName("script")[0];r.async=!0;r.src="//srv.tonefuse.com/showads/showad.js";r.readyState?r.onreadystatechange=function(){if("loaded"==r.readyState||"complete"==r.readyState)r.onreadystatechange=null,c()}:r.onload=c;s.parentNode.insertBefore(r,s)};}})();</script>Hey girl, what's up?
I know it's late, but I knew you'd pick it up
Naw, I ain't drunk

I do know that my "real lyrics" start right after "</script>" on every one of them.
Not sure where this is coming from, but am using ituneslyrics (I hate iTunes) but I can simply drag my new songs from MC21 into iTunes, that select all of them and run ituneslyrics and the lyrics field in the mp3 header gets populated (if the lyrics are found).  I then "update library from tags" in MC21.  All is great except for the garbarge on the front.
I would appreciate a quick "how to"
Thanks
TxGary
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Removing front end trash from Lyrics field
« Reply #1 on: July 28, 2015, 04:57:40 pm »

Here's an expression that will strip out the junk at the front.  Select a file or two (or a whole bunch).  Open the Tagging Pane (right click and select Tag).  Scroll down until you find the Lyrics tag.  Click in it.  In the Lyrics editing field that appears, paste this in:

Code: [Select]
=regex([Lyrics], /#</script>(.+)#/,1,0)
Try it on a song or two first to see if it works.  If it does, you can try it on a larger group, or totally shotgun it and do all of your songs that have lyrics.  Let me know if it needs some tweaking or if it outright doesn't work or something.

Brian.
Logged

TXgary

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 498
  • I'm a llama!
Re: Removing front end trash from Lyrics field
« Reply #2 on: July 28, 2015, 09:47:48 pm »

Sorry, I don't understand, I can get to the Lyrics tag, I click in it, but the lyrics editing field contains my problem. I can paste the code  in but how does it get executed?
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Removing front end trash from Lyrics field
« Reply #3 on: July 28, 2015, 10:39:33 pm »

^
When you click on the lyrics field in the Tagging Pane, the editor will show up, with the lyrics contents highlighted.  If you have several songs selected it will have [Varies] selected in the lyrics editor.

Either way, just paste in the expression, overwriting the highlighted lyrics, and it will get executed.  Just close the editor after you paste it in and it will work.

I've just done a little more testing and figured out that my expression will badly break a Lyrics field that doesn't have the </script> key word in it.  It will erase the Lyrics in that case!  Ouch.  If you can select only the ones that have the script part in them, great.  If not, I've figured out another expression that accounts for either case.  It's safe to use on regular lyrics fields and those that have your garbage you want removed.

Code: [Select]
=regex([Lyrics], /#(?:.*</script>)*(.+)#/,-1,0)[R1]
Brian.
Logged

TXgary

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 498
  • I'm a llama!
Re: Removing front end trash from Lyrics field
« Reply #4 on: July 29, 2015, 10:08:49 am »

Works like a charm.  thanks.
I used the second suggestion.
Logged
Pages: [1]   Go Up