[mythtv] Heads up: Smart playlists in MythMusic
Kevin Kuphal
kevin.kuphal at myrealbox.com
Mon Jan 26 16:23:10 EST 2004
I hadn't seen mention of your work so I had no idea it was in progress.
Regarding the format, I only opted not to embed a SQL statement so that
whatever frontend didn't need to "know" the SQL necessary so that if
something did change in the database, only the parser had to be modified
(not both the graphical and/or web frontends). Plus, it's probably just me,
but embedding SQL just rubs me the wrong way. By parsing I can double check
the inputs from the frontends to be sure things are valid.
I imagined exactly the type of frontend you mention as iTunes does with
any/all and then a series of statements. I just hadn't gotten to the
frontend part yet and wanted to get at least the backend support in place so
people could use it.
If I've stepped on any toes here with this WIP, let me know, I'll be happy
to let it go.
Kevin
> -----Original Message-----
> From: mythtv-dev-bounces at mythtv.org
> [mailto:mythtv-dev-bounces at mythtv.org] On Behalf Of Steele Price
> Sent: Monday, January 26, 2004 2:36 PM
> To: Development of mythtv
> Subject: Re: [mythtv] Heads up: Smart playlists in MythMusic
>
>
> grrr......
>
> I already have mine setup to read a full where clause, not
> some strange
> unknown protocol.
>
> I just parse the left 5 chars from the playlists field and
> resubmit the
> query to get the intids from musicmetadata if it = 'WHERE'.
>
> If yours goes into cvs, I can just stop all my work and go with this
> method I suppose. Though I would have to totally rethink the
> frontend,
> currently it looks pretty much the same as iTunes, where it
> adds/subtracts rows for criteria and builds the where clause for you.
>
> The frontend is done in PHP so it will work in mythweb, I
> just need to
> convert it over to mythmusic.
>
> Steele Price
> CTO
> Digital Dreamshop
> http://xtcp.net
>
>
>
> Kevin Kuphal wrote:
>
> >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
> >any|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
> >
> >
> >
> >
> >-------------------------------------------------------------
> ----------
> >-
> >
> >_______________________________________________
> >mythtv-dev mailing list
> >mythtv-dev at mythtv.org
> >http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
> >
> >
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-> bin/mailman/listinfo/mythtv-dev
>
More information about the mythtv-dev
mailing list