Getting all AutoPlaylists and a SongList for each

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey.

Moderator: Gurus

Getting all AutoPlaylists and a SongList for each

Postby gideonrv » Sun May 22, 2011 5:09 am

I write a C# application that uploads songs from an AutoPlaylist to a radio station playlist.

How can I get a list of all AutoPlaylists and a list of all songs for each? The documentation is not clear enough.
gideonrv
 
Posts: 42
Joined: Tue Feb 20, 2007 12:24 am
Location: Israel

Re: Getting all AutoPlaylists and a SongList for each

Postby gideonrv » Tue May 24, 2011 12:26 pm

Since I haven't got a reply yet, I tried to connect to the MM database, but I couldn't compose a proper query, because the table PlaylistSongs is always empty.

There's a workabout: To export the AutoPlaylist to an m3u playlist, and to read that one in my application. However, by doing this I'll lose the auto shuffle mechanism.

Can anybody help?
gideonrv
 
Posts: 42
Joined: Tue Feb 20, 2007 12:24 am
Location: Israel

Re: Getting all AutoPlaylists and a SongList for each

Postby mcow » Wed May 25, 2011 1:04 pm

What about something like this?

lists = SDB.PlaylistByTitle("").ChildPlaylists;

If you're using nested lists, you'll need to check each item in the returned list to see if has children.
mcow
 
Posts: 442
Joined: Sun Sep 21, 2008 9:35 pm
Location: Cupertino, California

Re: Getting all AutoPlaylists and a SongList for each

Postby gideonrv » Mon Jun 06, 2011 4:54 am

Thanks, it works. Just use SDB.PlaylistByTitle[""].ChildPlaylists;
gideonrv
 
Posts: 42
Joined: Tue Feb 20, 2007 12:24 am
Location: Israel


Return to Addons developer forum

Who is online

Users browsing this forum: No registered users and 0 guests