Loving this script.roylayer wrote:I really dislike albums tagged like "Yessongs (disc 1)" and "Yessongs (disc 2)." It's really all one album! Using that scheme, the tracks are usually labeled 1-n within each disc.
I prefer having one album entry per album and giving each track a unique number. 1-n would be fine, but an alternative that is especially useful if track numbers already exist under the "disc n" philosophy is to label them with a <disc#><trk#> scheme. Thus, disc 1, trk 3 becomes track# 103. I have developed a script to do this. (My first script! Yay!) Here it is:
FILENAME: FixTrkNo.vbs
'changes track# from format t to dtt (e.g. disc 1, trk 3 becomes track# 103)
'where t = trk# and d = disc#
'only works for track#s 99 or less
Option Explicit
Sub FixTrkNo
'Define variables
Dim list, itm, i, tmp, discno
discno = inputbox("Enter disc number")
'Get list of selected tracks from MediaMonkey
Set list = SDB.SelectedSongList
If list.count=0 Then
Set list = SDB.AllVisibleSongList
End If
'Process all selected tracks
For i=0 To list.count-1
Set itm = list.Item(i)
if itm.trackorder < 10 then
itm.TrackOrder = discno & "0" & itm.TrackOrder
else
itm.TrackOrder = discno & itm.TrackOrder
end if
'Update the changes in DB
itm.UpdateDB
Next
End Sub
ADD THIS ENTRY TO YOUR SCRIPTS.INI FILE:
[FixTrkNo]
FileName=FixTrkNo.vbs
ProcName=FixTrkNo
Order=2
DisplayName=&Format Track# to dnn
Description=Change Track# to disc number + track#
Language=VBScript
ScriptType=0
To use, highlight the tracks you want to change, then execute the script. It will ask you which disc# you want and will then do the rename.
Thanx heaps.