Old 6th October 2011, 00:45   #1
ChazZeromus
Junior Member
 
Join Date: Jul 2010
Posts: 18
Create, Delete, Edit playlists

Is there a simple answer? Simple sample code would be much appreciated!
ChazZeromus is offline   Reply With Quote
Old 24th October 2011, 07:37   #2
davor.geci
Junior Member
 
davor.geci's Avatar
 
Join Date: Aug 2011
Location: Croatia
Posts: 25
Quote:
Originally Posted by ChazZeromus View Post
Is there a simple answer? Simple sample code would be much appreciated!
Hi ChazZeromus,
can you give us a little more details. What programming language?
Do you think on edit .m3u files or communicate with winamp?
davor.geci is offline   Reply With Quote
Old 24th October 2011, 13:19   #3
ChazZeromus
Junior Member
 
Join Date: Jul 2010
Posts: 18
Any standard IPC messages would be preferred. I hoping there was an easier frontend approach to this, managed by winamp when it's running instead of modifying the m3u files directly.
ChazZeromus is offline   Reply With Quote
Old 24th October 2011, 13:26   #4
DrO
 
Join Date: Sep 2003
Posts: 27,873
there's no sendmessage based IPC messages for doing things to playlists.

there is the api_playlists (and related functions) which can be used to create / edit / remove playlists stored via the media library playlists plug-in, but not knowing what / where you're using playlists from it's tricky to suggest. i think all of that is in the 'playlists' folder in the recent sdk's.

though really, with playlists just being plain text files, most people beforehand have just made simple implementations to do it for them.

-daz
DrO is offline   Reply With Quote
Old 24th October 2011, 13:32   #5
ChazZeromus
Junior Member
 
Join Date: Jul 2010
Posts: 18
Well I'm assuming that editing the files themselves doesn't necessarily update the playlist nodes in the playlist treeview. That's why I'd prefer a method that's identical to creating the playlists yourself from the media library ui. Unless you use ReadDirectoryChanges.
ChazZeromus is offline   Reply With Quote
Old 24th October 2011, 13:43   #6
DrO
 
Join Date: Sep 2003
Posts: 27,873
what's in the 'playlists' folder in the sdk will allow you to access the management features equivalent to what the ml_playlists plug-in provides which does allow for adding playlists to the tree.

but if you're not wanting that (not really knowing why you're wanting to create playlists), then really it'll just be easier to go off and write some simple functions which will do it all for you (as i cannot work out in what context you're trying to do things or i'm just having a dumb day).

-daz
DrO is offline   Reply With Quote
Old 24th October 2011, 22:51   #7
ChazZeromus
Junior Member
 
Join Date: Jul 2010
Posts: 18
Let's put it this way, I want to create a second command next to "New Playlist" that creates a playlist from some source.
ChazZeromus is offline   Reply With Quote
Old 24th October 2011, 22:56   #8
DrO
 
Join Date: Sep 2003
Posts: 27,873
in what part of Winamp as 'new playlist' appears in quite a few places and adding menu items would need to be done in different ways depending on where it is to not break other handling, plug-ins, etc.

either way, i don't think you want to be using the media library's playlist interfaces since looking back at your prior posts, it doesn't look like it'd be an appropriate place if the playlists you're likely to be making are essentially dynamic.

-daz
DrO is offline   Reply With Quote
Old 24th October 2011, 23:03   #9
ChazZeromus
Junior Member
 
Join Date: Jul 2010
Posts: 18
Well they're not self updating, at least that's an interesting idea. I just want to be able to coalesce playlists from a simple table of artists, titles and albums. The user has a choice whether to update them manually. In my case more specifically, a site that has a list of these records and I want add a simple "Add X Playlist" in the tree view inside the left pane inside the medialibrary. I wasn't able to find a way to have my own shortcut item in the menu with the items "New Playlist...", "Import playlist from file", etc, so I'm using a system tray icon instead.
ChazZeromus is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump