I was thinking about how to do query-based playlists, and I came up
with a rough FXD file format:

<?xml version="1.0" ?>
    <freevo>
      <type="smartplaylist"/>
      <playlist>
        <match field="artist" type="contains">An Artist</match>
        <match field="album" type="is">An Album</match>
        <limit>25</limit>
        <order type="DESC">last_played</order>
      </playlist>
    </freevo>

It's fairly straightforward, but I'll explain:

1. The match field corresponds to the SQL "WHERE" clause, and could be any 
    of the fields in the table, or none at all or more than one.
2. The limit corresponds to the SQL "LIMIT" clause
3. The order type is either "DESC" or "ASC" and corresponds to ORDER BY

The types for the match field would be "is, is not, contains and notcontains"

So, this playlist would convert to:

SELECT filename FROM songs WHERE artist like "%An Artist%" AND
     album="An Album" ORDER BY last_played LIMIT 25 

And would return the 25 most recently played tracks by "My Artist" 
from "My Album"

Then, every time the playlist is accessed, it would regenerate the playlist
using the query and return a list of files for a normal playlist. 

Aubin






-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to