Has anyone written a script/plugin that could do the following or can help with this request?
- Say I have a playlist that I exported out of another program that I imported into MusicBee
- This playlist is called "Top 1000 Played EDM Tracks"
- Since I am new to MusicBee the play counts on all my files are 0
- I am looking for a script that will take a selected x number of tracks and take the track at the top and set its play count to x, the 2nd track set to a play count of x-1 and so on, until the last track in the selected list of tracks gets a play count of 1
If this is an easy ask, can anyone help and "whip something up"? It would be greatly appreciated ;-)
If it helps... I had a vb script in that other program called "AutoDecrementPlayCounters" that would ask for the top # and do the same thing as described above, I just don't know how to convert it to a MusicBee plugin
Sub AutoDecrementPlayCounters
' Define variables
Dim list, itm, i, tmp
' Get list of selected tracks from MediaMonkey
Set list = SDB.CurrentSongList
If list.Count=0 Then
Exit Sub
End If
Set UI = SDB.UI
' Create the window to be shown
Set Form = UI.NewForm
Form.Common.SetRect 0, 0, 400, 180
Form.FormPosition = 4 ' Screen Center
Form.BorderStyle = 3 ' Dialog
Form.Caption = SDB.Localize("Auto-decrement Play Counters")
Set Lbl = UI.NewLabel( Form)
Lbl.Common.SetRect 10,15,370,40
Lbl.AutoSize = False
Lbl.Multiline = True
Lbl.Caption = SDB.LocalizedFormat( "This will modify the play count field in sequential decreasing order for the %d selected tracks. Do you want to proceed?", list.Count, 0, 0) ' TODO: Localize
Set Lbl = UI.NewLabel( Form)
Lbl.Common.SetRect 10,65,280,20
Lbl.Caption = SDB.Localize("Start numbering from:")
Set SE = UI.NewSpinEdit( Form)
SE.Common.SetRect Lbl.Common.Left+Lbl.Common.Width+10, 61, 50, 20
SE.MinValue = 1
SE.MaxValue = 9999
SE.Value = 1
Set Btn = UI.NewButton( Form)
Btn.Caption = SDB.Localize("OK")
Btn.Common.SetRect 115,100,75,25
Btn.ModalResult = 1
Btn.Default = true
Set Btn = UI.NewButton( Form)
Btn.Caption = SDB.Localize("Cancel")
Btn.Common.SetRect 220,100,75,25
Btn.ModalResult = 2
Btn.Cancel = true
if Form.ShowModal=1 then
number = SE.Value
' Process all selected tracks
For i=0 To list.count-1
Set itm = list.Item(i)
' Swap the fields
itm.PlayCounter = number
number = number - 1
Next
list.UpdateAll
End If
End Sub