MediaMonkey script (title pruner)

The majority of my spare time is spent listening to music – my preferred application for listening to music is Media Monkey. However as I have done some DJ’ing in the past a lot of my music is from compilations. To rip my music I use CDEX – the tracks names from FreeDB for compilations are usually returned something like …. “Slade/Merry Christmas” with artist names all “Various”. The following is a script/tutorial that splits this title into the correctly formatted name and artist.

This script has literally saved me days of time in getting my library sorted and nicely formatted. As I recently began to use last.fm it became apparent I needed to sort all my compilations out, it has always bugged me anyway. Last night I started to manually convert song by song I looked and had 3000 to do. This morning I got up and thought this is madness there must be a better way so I set off on a hunt on how to create scripts in Media Monkey and set to work. This is how to get it working….

Step 1 Locate C:\program files\MediaMonkey\Scripts\Scripts.ini and open this with notepad … copy and paste the following and save.

[Slash Stripper]
FileName=Trimtitle.vbs
ProcName=TrimTitle
Order=21
DisplayName=&Trim Title at / Change
Description=Trim Title at / Change
Language=VBScript
ScriptType=0

Step 2 Download the script unzip and place Trimtitle.vbs in the scripts folder (C:\program files\MediaMonkey\Scripts).

Load up Media Monkey Select the songs from your library you wish to change the title of. Then select Tools > Scripts > Trim Title at / Change. You will then be asked what is splitting the title e.g. “/” “-” enter the value in the text box. Next a pop up asks if the artist name comes first or second this places the title and artist in the right place. Your title’s should be nicely formatted. Voila!!

Example: “Motorhead / Ace of Spades” will now be Motorhead under artist and Ace of Spades under title.

This script has worked great for me – hope it helps others too. If it does go wrong there is always the function to re-tag files from their filename (Tools>Autotag from file name). Also if you get artist and title mixed up use (Tools>Scripts>Swap artist and title). I also recommend doing it album by album as splitters might be different. Also check the artist doesn’t have the splitter value in their name – very unlikely think I came across it once.

For those interested here is the code for the name splitter – if you know vbScipt which is what this is written in then might even set you on your way to create your own script. I guess the opportunities are endless….

Sub TrimTitle
Dim list, itm, i, tmp, filename, positionofSlash, lengthofTitle, NewName, NewTitle

splitCheck=InputBox(“What is splitting the title e.g / -?”)
confirmPos = MsgBox (“Is artist positioned before splitter e.g Kanye West/Strong?”,4)

Set list = SDB.CurrentSongList

For i=0 To list.count-1
Set itm = list.Item(i)

filename = itm.Title
positionOfSlash = InStr(filename,splitCheck)
lengthofTitle = Len(filename)
If positionOfSlash > 0 then
NewName= Trim(Mid(filename,1,positionOfSlash-1))
NewTitle= Trim(Mid(filename,positionOfSlash+1,lengthofTitle))

If confirmPos = 6 Then
itm.Title = NewTitle
itm.ArtistName = NewName
Else
itm.Title = NewName
itm.ArtistName = NewTitle
End If
End If
Next
list.UpdateAll

End Sub

Download the script

Media Monkey Script

Post by: Richard

Tags: , , , , ,

Leave a Reply