Page 1 of 1

move/copy fields to tags

Posted: Mon Sep 25, 2006 4:41 am
by m0d01
anyone know how i can move or copy 3 fields to ID3 tags. these aren't done when syncing the library to tags (2 of the 3 aren't, at least):

date last played
# plays
rating

i posted earlier about adding fields to the export.vbs file. these two questions are both posted to achieve one goal. i've started using J River Media Center and want to take my play counts and last played dates with me. i've already got eh ratings moved over. jrmc can add the tag information to the library. even if these fields were copied to custom fields, i could move them again once i have the data in jrmc.

please help! i've been tracking my playcounts and ratings for far too long to to throw them out the window.

tks,
n1ck

Posted: Mon Sep 25, 2006 5:59 am
by trixmoto
Your script could do this...

Code: Select all

itm.Custom1 = itm.LastPlayed
itm.Custom2 = itm.PlayCounter
itm.Custom3 = itm.Rating
This would copy the information into the custom fields for you.

Posted: Mon Sep 25, 2006 6:48 am
by m0d01
trixmoto wrote:Your script could do this...

Code: Select all

itm.Custom1 = itm.LastPlayed
itm.Custom2 = itm.PlayCounter
itm.Custom3 = itm.Rating
This would copy the information into the custom fields for you.
i'm assuming there's more to the end result script than simply those 3 lines. i'm still getting warmed up with the scripting thing...and i hate to keep bugging you about this.

n1ck

Posted: Mon Sep 25, 2006 8:48 am
by trixmoto
The full script would be something more like this...

Code: Select all

Sub CopyPlayInfo
  Dim list,itm,prog,i
  Set list = SDB.CurrentSongList
    
  Set prog = SDB.Progress
  prog.Text = "Initialising script..."
  prog.MaxValue = list.Count
  
  For i=0 To list.Count-1
    prog.Text = "Copying fields from track "&(i+1)&" of "&list.Count&"..."
    prog.Value = i
    Set itm = list.Item(i)
 
    itm.Custom1 = itm.LastPlayed
    itm.Custom2 = itm.PlayCounter
    itm.Custom3 = itm.Rating

    If prog.Terminate Then Exit For
  Next

  list.UpdateAll  
  prog.Text = "Finalising script..."
  prog.Value = prog.MaxValue
  Call SDB.MessageBox("Tracks updated: "&list.Count,mtInformation,Array(mbOk))
End Sub