[mythtv] Heads up: Smart playlists in MythMusic

Kevin Kuphal kevin.kuphal at myrealbox.com
Mon Jan 26 14:41:50 EST 2004


Just a heads up that I should be submitting a patch soon that adds basic
backend smart playlist support.  That is, right now, there is no GUI to
configure it but you can edit the playlist entries in the DB to configure.

Right now a list is defined in place of the comma delimited list of song Ids
in the musicplaylist table like:

smart:[any|all]:[field],[operand],[result];[...]

any|all: Either any or all depending on whether you want all conditions met
or any condition
field: any field from the musicmetadata table
operand: any valid SQL operator like =, <, >, LIKE, etc.
result: the value to test against.  Text must be quoted.

So

smart:all:artist,=,"Fuel";playcount,>,1

Would generate a playlist at selection time with this SQL:

SELECT intid FROM musicmetadata WHERE artist = "Fuel" AND playcount > 1;

I have to do some more testing but it seems to work so far.

Kevin




More information about the mythtv-dev mailing list