tnx cnbc
By adding files you mean:
pseudocode
MJFileAutomation file=MJFilesAutomation::GetFile(number nFile)
MJCurPlaylistAutomation::AddFileByKey(MJFileAutomation::(file)GetKey(),position) ?
So you add the files by looking up their keys in the playlist and add the outcome to the current playlist if i understand it well.
Do you have to keep track of the position yourself or do you just give position number 0 so it'll add on top.
The problem with that is in the end the current playlist will be the entire library.......
The docs are a bit dense. Apparently they assume knowledge about the working of MC which i wouldn't know were to find.
Granted my errorchecking is minimal, but hey it's a tryout.
Playlist is a public in the class, it is used by
void __fastcall TMediaCenter::MCAutomationFireMJEvent(TObject *Sender, BSTR bstrType,
BSTR bstrParam1, BSTR bstrParam2)
{
UnicodeString trk;
trk=bstrParam1;
if (trk.Pos("TRACK") || trk.Pos("STATE")) {
MJPlaybackStates states=Playback->State;
PlayFile = Playlist->GetFile(Playlist->Position);
........
to display tracks. And that functions fine as long as i don't do the 'skip playlist'.
Also in the debugger Playlist is the same address as on startup.
So it's not a null pointer.
TO MC DEVELOPERS:Please add Get/SetPlaylist to MJCurPlaylistAutomation........