[mythtv] [PATCH] Add smart playlists to mythmusic

Paul mythtv at dsl.pipex.com
Mon Jan 31 11:20:54 EST 2005


This patch allows you to create playlists that are dynamically updated
every time you select one by running a simple SQL query on the
musicmetadata table. It allow you to, for example, create a playlist
that contains all the tracks by a particular artist, all your favourite
tracks, all the tracks from a genre etc. You can also create an order by
clause which allows you to order the tracks how you like and limit the 
number of tracks in a playlist. Playlists can be grouped together by 
category. You could for example create categories called 'By Artist', 
'By Genre' etc. that way you don't get one big list of playlists but 
several playlist grouped together by a category. The patch adds a few 
demo smartplaylists to get you started.

At the moment you can only access the smartplaylists from the playback
screen by pressing the 'MENU' key which brings up a popup menu.
The top item 'Smart Playlists' takes you to the smart playlist selection
dialog. The items below that allow you to quickly create a playlist that
contains:- all tracks, all tracks by the currently playing artist, all
tracks from the currently playing album, all tracks from the currently
playing genre or all tracks from the currently playing year.

I won't describe all the dialogs in detail. If you have any questions then
please just ask. I hope it is self explanatory!

I was waiting for the compilation artist patch to be applied to cvs before
submitting this patch but has it seems things are starting to gear up
towards the 0.17 release I thought it would be a good idea to get it into
cvs so any problems could be ironed out before the release. I hope you
don't mind Colin. I know your patch touches several of the same files as
this patch.

I haven't been able to spend as much time on  testing as I would have
liked but it seems to work OK for me. I think I have made all the query's
utf8 friendly. As always if anybody spots any problems please let me know 
and I will try to fix it. 

One thing that is missing from the patch is support for the bool and date
type fields. Which means you can't query the 'compilation' or 'last_played'
fields which is no big loss. I will try and add them later.

I had to hand edit the patch slightly to remove some other stuff that
doesn't belong in this patch. I hope I haven't screwed the patch up in the 
process or removed something that I shouldn't.

Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smartplaylist.patch.tar.gz
Type: application/octet-stream
Size: 16139 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050131/05c4e0ca/smartplaylist.patch.tar.obj


More information about the mythtv-dev mailing list