I created a SQLPlaylist to play random songs that haven't yet been rated.  I 
did this instead of using the standard Not Rated Songs trackstat dynamic 
playlist, because that one includes ordering by playcount, which totally biases 
the randomness.

I also wanted to exclude certain genres.  I decided to use a custom skip 
filter, and referenced the skip filter from the SQLPlaylist as follows:

-- PlaylistName:Phil's Not Rated Songs
-- PlaylistGroups:Songs
-- PlaylistStartAction1:cli:customskip setsecondaryfilter skip_non_songs.cs.xml
-- PlaylistStopAction1:cli:customskip clearsecondaryfilter
select tracks.url from tracks
        left join track_statistics t1 on
                tracks.url=t1.url
        left join track_statistics t2 on
                tracks.url=t2.url and t2.rating>0
        left join dynamicplaylist_history on
                tracks.id=dynamicplaylist_history.id
where
        tracks.audio=1
        and t2.url is null
        and dynamicplaylist_history.id is null
        and ifnull(t1.lastplayed,0)<(unix_timestamp()-10800)
group by tracks.id
order by rand()
limit 10;

I have several genres to exclude, so I have several filters in the filter set.  
I guess each filter in the set is applied as a "where not exists()" query.

However, it takes a few seconds to generate a playlist - and I'm worried about 
the efficiency of adding extra songs onto the playlist over time.  

I thought of adding a "where not exists()" filter directly into the 
SQLPlaylist, but that's not as easy to maintain.

Would it be possible to create a custom skip filter that allows multiple genres 
to be picked in one filter?

Also, I would like to exclude songs that exist in a certain folder path (to 
ensure all podcasts are excluded, as they don't all have genre=podcast), but 
there's no custom skip filter for that.

Phil
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to