Author Topic: setting date added via API?  (Read 6015 times)

stax76

  • Jr. Member
  • **
  • Posts: 28
Can date added be set via API? There are three things I want to import from MediaMonkey 4:

date added
play count
custom field

play count don't seem to be supported, could I add this via plugin? Would sorting then work? I guess not because alphanumerical sort would be needed. Could it be still be done with some workaround maybe?

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34313
For custom fields i recommend you map them in Preferences/ Tags(1)/ custom tags so any updates done in MB are saved
Search the forum for posts from other mediamonkey users who have already done this
Play count and date added can be imported from an iTunes xml file, for which there is a MediaMonkey plugin that generates that file.
Again search the forum as it has been discussed before
if you still want to use the API, date added is 12 and play count is 14. ie. cast those values to MetaDataType and use Library_SetFileTag
then Library_CommitTagsToFile
and MB_RefreshPanels once at the end


leifel

  • Newbie
  • *
  • Posts: 17
if you still want to use the API, date added is 12 and play count is 14. ie. cast those values to MetaDataType and use Library_SetFileTag
then Library_CommitTagsToFile

I need this, but I also need to update the "Last Play Date" of some tracks. I can't find it represented in the MetaDataType enum. What is the value I can use to set it?

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34313
its 13
just look for the value in FilePropertyType and cast as MetaDataType