How are playlist stored in DB

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

Lowlander
Posts: 56570
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

How are playlist stored in DB

Post by Lowlander »

I would like to know how playlists are stored in the DB.

I found playlists in the Playlist table, but no links to songs that are on the playlists.
My PlaylistSongs is empty (I only have autoplaylists).

My guess is that for autoplaylists I would need to use the QueryData field in the Playlist table, but I don't know how to??
And for normal playlists I guess one would need to use the PlaylistSongs table.

Please inform me on how I can access these playlists.
TheRocket
Posts: 84
Joined: Sat Jan 17, 2004 4:42 pm
Location: Quebec, Canada

Auto playlists

Post by TheRocket »

Hi,

Normal playlists are stored in the PlaylistsSongs (or something like that).

For AutoPlaylists, then the misc criterias and params (WHere, Order by, Top X) are stored in the CommonQueryData (or something like that) with the playlist.

EDIT: The format of this field seems to be like a INI file... but it may not be easy to find information from this data in a string variable...

In order to create the query to get songs, you will need to read and decode those criterias, and buit a SQL query according to those criterias..

(maybe it will change with advanced SQL-based playlists, or with custom trees and nodes in MM...

(and that something I need to implement in my MMWBE :-))
TheRocket
-- MMWBE 0.91 released! Get it here http://rocket.dyndns.info/mp3manager/mmwbe_v091.rar or see topic http://www.mediamonkey.com/forum/viewto ... 4005#34005 for more details!!!
Lowlander
Posts: 56570
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Post by Lowlander »

Any idea on how to extract the query from this field?
jiri
Posts: 5419
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

It isn't easy, MM reads data from the field and then builds a SQL statement to read tracks from DB. Maybe some COM object method could be added to let you build the query...

Jiri
Lowlander
Posts: 56570
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Post by Lowlander »

It would be a nice addition to WebMonkey if I can get the query that is stored in this field to use in ASP. I will see what comes along in the future that can be helpful
TheRocket
Posts: 84
Joined: Sat Jan 17, 2004 4:42 pm
Location: Quebec, Canada

Continuing topic

Post by TheRocket »

Hi!

(already working on autoplaylists :-))

what are the possible values for Condition=XX in QueryData in table AutoPlaylists

32 seems to be "different"...

also, any others sections other than [Common] and [Adv] and sometimes [Basic] and [AdvSO_] and [AdvCond_]?

hehe it is cool to do reverse engenering :-)
TheRocket
-- MMWBE 0.91 released! Get it here http://rocket.dyndns.info/mp3manager/mmwbe_v091.rar or see topic http://www.mediamonkey.com/forum/viewto ... 4005#34005 for more details!!!
Lowlander
Posts: 56570
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Post by Lowlander »

Good

plz keep us posted, I'm very interested in accessing this directly in the DB.
TheRocket
Posts: 84
Joined: Sat Jan 17, 2004 4:42 pm
Location: Quebec, Canada

Hehehh

Post by TheRocket »

Already got small support for autoplaylists!!!

took me 2 or 3 hours to code :-)

It needs more code for status conditions and basic playlists :-)

And I've bought a gold license... and I have a warm and fuzzy feeling lol :-)
I think MMWBE will take more time than expected... there is so many features :-)
TheRocket
-- MMWBE 0.91 released! Get it here http://rocket.dyndns.info/mp3manager/mmwbe_v091.rar or see topic http://www.mediamonkey.com/forum/viewto ... 4005#34005 for more details!!!
Post Reply