While a switch to turn on or off considering the start and stop times specified would be more user-friendly, since it does not seem to be coming I've developed a work-around with 2 scripts using the custom field 5.
One script copies the start and stop times to custom field 5 and resets the start and stop times to the default:
Code: Select all
'=============================================================================================
'
' MediaMonkey Script
'
' NAME: Move start and stop times to Custom 5 field.
'
' AUTHOR: Tanguy Kervahut
' DATE : 13/02/2014
'
' INSTALL: Copy to Scripts directory and add the following to Scripts.ini
' Don't forget to remove comments (') and set the order appropriately
'
' [MoveTimeToCustom5]
' FileName=MoveTimeToCustom5.vbs
' ProcName=MoveTimeToCustom5
' Order=15
' DisplayName=&Move out start/stop time (normal)
' Description=Move out start and stop time to custom 5 field
' Language=VBScript
' ScriptType=0
'
'=============================================================================================
Sub MoveTimeToCustom5
' Get list of tracks having specific start or stop time
Dim list : Set list = SDB.NewSongList
Dim Iter : Set Iter = SDB.Database.QuerySongs("Songs.StartTime > 0 OR (Songs.StopTime > 0 AND Songs.StopTime < Songs.SongLength)")
Do While Not Iter.EOF
list.Add( Iter.Item )
Iter.Next
Loop
If list.Count = 0 Then
Call SDB.MessageBox("No tracks with start/stop time to move.",mtInformation,Array(mbOk))
Exit Sub
else
Call SDB.MessageBox("Nb tracks with start/stop time to move out: " & list.Count,mtInformation,Array(mbOk))
End If
' Define variables
Dim i, CurSong
' Process tracks
For i=0 To list.count-1
Set CurSong = list.Item(i)
CurSong.Custom5 = CStr(CurSong.StartTime) +"_"+ CStr(CurSong.StopTime)
CurSong.StartTime = 0
CurSong.StopTime = CurSong.SongLength
Next
' Write all back to DB and update tags
list.UpdateAll
End Sub
The other script copies back the start and stop times from custom 5:
Code: Select all
'=============================================================================================
'
' MediaMonkey Script
'
' NAME: Move Custom 5 field value to start and stop time.
'
' AUTHOR: Tanguy Kervahut
' DATE : 13/02/2014
'
' INSTALL: Copy to Scripts directory and add the following to Scripts.ini
' Don't forget to remove comments (') and set the order appropriately
'
' [MoveCustom5ToTime]
' FileName=MoveCustom5ToTime.vbs
' ProcName=MoveCustom5ToTime
' Order=15
' DisplayName=&Move in start/stop time (party)
' Description=Move in start and stop time from custom 5 field
' Language=VBScript
' ScriptType=0
'
'=============================================================================================
Sub MoveCustom5ToTime
' Get list of tracks with a value in Custom 5
Dim list : Set list = SDB.NewSongList
Dim Iter : Set Iter = SDB.Database.QuerySongs("Songs.Custom5 <> ''")
Do While Not Iter.EOF
list.Add( Iter.Item )
Iter.Next
Loop
If list.Count = 0 Then
Call SDB.MessageBox("No tracks with value in Custom 5.",mtInformation,Array(mbOk))
Exit Sub
else
Call SDB.MessageBox("Nb tracks with start/stop time to move in: " & list.Count,mtInformation,Array(mbOk))
End If
' Define variables
Dim i, CurSong, SepPos
' Process tracks
For i=0 To list.count-1
Set CurSong = list.Item(i)
SepPos = InStr(CurSong.Custom5, "_")
if SepPos > 0 Then
CurSong.StartTime = CLng(Left(CurSong.Custom5,SepPos-1))
CurSong.StopTime = CLng(Right(CurSong.Custom5,Len(CurSong.Custom5)-SepPos))
' CurSong.Custom5 = ""
End If
Next
' Write all back to DB and update tags
list.UpdateAll
End Sub
So you just need to use those to switch between using custom or default start/stop times.
Cheers!