Mass clearing of lyrics

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Mass clearing of lyrics

Re: Mass clearing of lyrics

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

RegExp Find & Replace add-on can clear almost all fileds in batch.

Re: Mass clearing of lyrics

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

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

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.

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...

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.

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!

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?

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!

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!

Mass clearing of lyrics

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

Top