bernt wrote:
> Hi!
>
> After a few hours of trail end error I reliased that I need help. I want
> a one click random playlist from a specific genre.
>
> Here is a wild guess...
You want the track urls so you start with the tracks table. If you used
DPL to select the genre (user input parameter) then DPL would look up
the genre ID and therefore all the (built-in) dynamic playlist use the
genre_track table (which only matches genre IDs and track IDs). Since
you want to use the genre name you'll also need the genre table with the
names.
No guarantees - here's my version:
Code:
--------------------
-- PlaylistName:Jazz-Pop
-- PlaylistGroups:Soft
-- PlaylistCategory:songs
select distinct tracks.url from tracks
join genre_track on
tracks.id = genre_track.track
join genres on
genre_track.genre = genres.id and genres.name like '%%Jazz%%'
left join dynamicplaylist_history on
dynamicplaylist_history.id=tracks.id and
dynamicplaylist_history.client='PlaylistPlayer'
where
tracks.audio = 1
and tracks.secs >= 'PlaylistTrackMinDuration'
and dynamicplaylist_history.id is null
group by tracks.id
order by random()
limit 'PlaylistLimit';
--------------------
*Plugin repositories:* 'Ratings Light'
(https://github.com/AF-1/lms-ratingslight) 'Visual Statistics'
(https://github.com/AF-1/lms-visualstatistics) 'Use Comment Tag
Info' (https://github.com/AF-1/lms-usecommenttaginfo) 'Dynamic
Playlists 3 FAQ' (https://github.com/AF-1/lms-dynamicplaylists#faq)
'Custom Skip 3 FAQ' (https://github.com/AF-1/lms-customskip#faq)
------------------------------------------------------------------------
afriend's Profile: http://forums.slimdevices.com/member.php?userid=39306
View this thread: http://forums.slimdevices.com/showthread.php?t=115073
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins