Medialooks Knowledge Base Support Center

Contact Us

Custom metadata for playlist items

You can add any extra information to playlist items.  For example, it is useful when you need to mark your playlist items with type ("news", "movie", "music" etc.). 

To specify a metadata field you should use PropsSet method. And to retrieve it back - PropsGet method.

Do not use names of existed properties for metadata. It is strongly recommended to create a custom node (for example, "my_custom_metadata").

And when you save a playlist to an external file or string these properties (metadata) are saved too. So after loading of the playlist XML configuration you are able to get your custom information.

int nIndex = -1; 
MItem pItem; 
m_objPlaylist.PlaylistAdd(null, @"c:\test.mp4", "", ref nIndex, out pItem); 
((IMProps)myItem).PropsSet("my_custom_metadata::info_type", "movie"); 
m_objPlaylist.PersistSaveToFile("", @"c:\myPlaylist.xml", "");