Mass clearing of lyrics

Get answers about using the current release of MediaMonkey for Windows.

Moderator: Gurus

Sgrom
Posts: 84
Joined: Sat Sep 02, 2006 5:59 am

Mass clearing of lyrics

Post by Sgrom » Sun Sep 03, 2006 5:59 pm

Hi again

Was wondering, how can I clear the lyrics field for all my mp3s? Cant find a way to batch do them all...

Sgrom

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto » Mon Sep 04, 2006 4:59 am

This could be done with a simple little script...

Code: Select all

Sub ClearLyrics
  Dim list : Set list = SDB.SelectedSongList 
  If list.count = 0 Then 
    Set list = SDB.AllVisibleSongList 
  End If 

  If list.count = 0 Then 
    Call SDB.MessageBox("Please select tracks to be updated", mtError, Array(mbOk)) 
    Exit Sub 
  End If
  
  Dim i : i = SDB.MessageBox("Clear lyrics from "&list.Count&" tracks?", mtConfirmation, Array(mbYes,mbCancel))
  If Not (i = mrYes) Then
    Exit Sub
  End If
  
  For i = 0 To list.Count-1
    list.Item(i).Lyrics = ""
  Next
  list.UpdateAll
End Sub
And you'll need to add this section to your Scripts.ini file to trigger the script...

Code: Select all

[ClearLyrics]
FileName=ClearLyrics.vbs
ProcName=ClearLyrics
Order=1
DisplayName=Clear Lyrics
Description=Clear lyrics from selected tracks
Language=VBScript
ScriptType=0
Edited line missing double quote character!
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

MCSmarties
Posts: 248
Joined: Tue Dec 06, 2005 8:01 pm

Post by MCSmarties » Tue Sep 05, 2006 4:23 pm

trixmoto: great script, as usual.

Small comment: you can easily modify this script to overwrite the lyrics field of several files with a pre-defined text.

For instance, I add [Instrumental] to the lyrics field of all my instrumental tracks
(to prevent confusion with vocal tracks for which I don't have any lyrics yet).

Your script (slightly modified) helped me greatly with that task, thanks!

Sgrom
Posts: 84
Joined: Sat Sep 02, 2006 5:59 am

Post by Sgrom » Tue Sep 05, 2006 4:26 pm

Thanks, awesome stuff, about to try it out!

EDIT: Works like a charm, awesome stuff :D

I think maybe some scripts for batch clearing fields, comments, lyrics etc should come standard. I hate having mp3s with random peoples names in the comments field! Lol.

What you guys think?

Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex » Tue Sep 05, 2006 4:51 pm

MCSmarties wrote:trixmoto: great script, as usual.

Small comment: you can easily modify this script to overwrite the lyrics field of several files with a pre-defined text.

For instance, I add [Instrumental] to the lyrics field of all my instrumental tracks
(to prevent confusion with vocal tracks for which I don't have any lyrics yet).

Your script (slightly modified) helped me greatly with that task, thanks!
A very good idea!
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto » Wed Sep 06, 2006 3:32 am

Yeah, I'm thinking of turning this into a proper useable script with a field option and a text option. You'd only need ones (like Lyrics) that you couldn't do with the standard Properties window though.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

m_bojangles
Posts: 98
Joined: Fri Jun 11, 2004 8:22 pm

Post by m_bojangles » Fri Jan 19, 2007 7:04 pm

I'm excited, I just found this thread while searching. I'm in the exact same position as MCSmarties. I want to mass update my lyrics field on instrumentals with simply the word "Instrumental" so that I don't have to worry about MiniLyrics popping its search box at me.

So thanks for this!
Off to try it now...

m_bojangles
Posts: 98
Joined: Fri Jun 11, 2004 8:22 pm

Post by m_bojangles » Fri Jan 19, 2007 7:10 pm

Anybody know how to modify this script so that it prompts the user for a string that can go here: list.Item(i).Lyrics = ""

If the entry is left blank, then the script can clear the lyrics as designed. But if I enter a string, say "Instrumental" then the script will replace the lyrics with my entered string.

Currently, I have hard-coded "Instrumental". Thanks.

m_bojangles
Posts: 98
Joined: Fri Jun 11, 2004 8:22 pm

Post by m_bojangles » Fri Jan 04, 2008 10:21 pm

Just installed MM3 and was wondering if this will work. It appears to work well. I use this to change my lyrics field to "Instrumental" or to "Foreign" depending on which set of tracks I've selected.

The script is called MassLyrics.vbs and is in my Scripts folder:

Code: Select all

Sub MassLyricsInst
  Dim list : Set list = SDB.SelectedSongList
  If list.count = 0 Then
    Set list = SDB.AllVisibleSongList
  End If

  If list.count = 0 Then
    Call SDB.MessageBox("Please select tracks to be updated", mtError, Array(mbOk))
    Exit Sub
  End If
 
  Dim i : i = SDB.MessageBox("Update lyrics from "&list.Count&" tracks with 'Instrumental'?", mtConfirmation, Array(mbYes,mbCancel))
  If Not (i = mrYes) Then
    Exit Sub
  End If
 
  For i = 0 To list.Count-1
    list.Item(i).Lyrics = "Instrumental"
  Next
  list.UpdateAll
End Sub

Sub MassLyricsFor
  Dim list : Set list = SDB.SelectedSongList
  If list.count = 0 Then
    Set list = SDB.AllVisibleSongList
  End If

  If list.count = 0 Then
    Call SDB.MessageBox("Please select tracks to be updated", mtError, Array(mbOk))
    Exit Sub
  End If
 
  Dim i : i = SDB.MessageBox("Update lyrics from "&list.Count&" tracks with 'Foreign'?", mtConfirmation, Array(mbYes,mbCancel))
  If Not (i = mrYes) Then
    Exit Sub
  End If
 
  For i = 0 To list.Count-1
    list.Item(i).Lyrics = "Foreign"
  Next
  list.UpdateAll
End Sub
Then I have these entries in my Scripts.ini file which is also in the Scripts folder:

Code: Select all

[MassLyricsInst]
FileName=MassLyrics.vbs
ProcName=MassLyricsInst
Order=60
DisplayName=Instrumental Mass Lyrics Updater
Description=Mass update lyrics for selected Instrumental tracks
Language=VBScript
ScriptType=0

[MassLyricsFor]
FileName=MassLyrics.vbs
ProcName=MassLyricsFor
Order=61
DisplayName=Foreign Mass Lyrics Updater
Description=Mass update lyrics for selected Foreign tracks
Language=VBScript
ScriptType=0

pshock13
Posts: 7
Joined: Mon Feb 03, 2014 2:12 pm

Re: Mass clearing of lyrics

Post by pshock13 » Fri Apr 15, 2016 12:08 am

I have to say...years later this is still incredibly helpful. And I'm surprised it's still not a default implementation.

IDR what update it was, but there was one that, when searching for lyrics, would also and a huge line of <script> stuff into the field. I was getting tired of manually opening the lyrics tab and deleting that section of text. Now that MM no longer appends that <script> to the lyrics, I'm fine just deleting all the lyrics and having MM auto search them whenever a track is played.

Thank you from the future

MMFrLife
Posts: 2774
Joined: Fri Oct 26, 2012 9:04 pm

Re: Mass clearing of lyrics

Post by MMFrLife » Fri Apr 15, 2016 7:30 am

RegExp Find & Replace add-on can clear almost all fileds in batch.
MM user since 2003 (lifetime since 2012) "Trying to imagine life without music gives me a headache"
track properties; dir/fn mask configurations; check out ZvezdanD's scripts
MMW 4.1.18.1842b; fav scripts > RegExp Find & Replace 5.1.0; Magic Nodes 5.1.0; Advanced Duplicate Find & Fix 3.8.2;
Backup 6.0; Clear Now Playing Button 1.2
...always back it up, especially before doing anything major!!!
Win. explorer alt. for power users [free]; great file/folder renamer [used by nasa]

Post Reply