PDA

View Full Version : Retrieving the Playlist info


rickcau
1st April 2002, 20:26
I am working on a C# assembly that I plan on calling from ASP.Net to remotely control WinAMP. I know this has been done with httpQ.

Anyway, I have a lot of the features working, but I cannot find anything in the SDK docs that explain how to enumerate the current Playlist.

I found the message that writes the current playlist to winamp.m3u. This means that I would have to open and read winamp.m3u. I am looking for a message that returns all the items in the playlist.

Just like httpQ does for it's GETPLAYLISTTITLE.

***********************************************************
GETPLAYLISTTITLE (requires Winamp 2.04+)

action: returns the title of the playlist entry at index 'argument'.
note: if no argument is specified, returns a list of all the titles in the playlist seperated by '<br>'.
argument: index in the list from which to retrieve title.
note: the list is zero indexed so track 1 is 0.
return: Title of track or 0 on error.
example: http://localhost:4800/getplaylisttitle?p=pass&a=1 (get title at list index 1)
or
http://localhost:4800/getplaylisttitle?p=pass (get a list of titles)

Gourou
3rd April 2002, 15:13
I'm assuming your a plugin, because that is the only way to do it. There is a plugin I use called VbCom I think, or WinampCom, that makes a VB object, that does the same thing, then I call that and request the playlist, entry by entry, you know how many there are because that is another call you can make. If you do this yourself, I think there is an API call that will tell you the Song Title, and Song Filename for each entry using index, but I cant do this because I use VB, and I cant make a direct plugin, I can use a wrapper, but then I'm THE dll that needs to make the call, genwrapper is, and it still doesnt work for me. So, yeah :p Use the API that gets the Title, then just increment it through the entire playlist