====== Random Playlist ======
With the magic of sql active playlist we can make a few random playlists for your needs.
Here are a few activesql playlists that do some randomness. Note you can change the where part to say only certain emulators and limit the # of games to return.
Like following videos?: See this nice video: [[https://www.youtube.com/watch?v=-ZwC32AzgIM|https://www.youtube.com/watch?v=-ZwC32AzgIM]]
Basic random list that changes each time you go into/out of playlist. uses all games and limits 10
Select * from Games where visible=1 order by random() limit 10
===== Daily Random Playlist =====
Lets say you want the same random playlist for day. So random tables will be different each 24 hours.
select *,cast(strftime('%f',dateadded) as float)*gameid*gameid*cast(strftime('%d%m','now') as int)%(548664) as seed from games where visible=1 order by seed limit 10
===== Weekly Random Playlist =====
Lets say you want the same random playlist for the week. So random tables will be different each week;
select *,cast(strftime('%f',dateadded) as float)*gameid*gameid*cast(strftime('%W','now') as int)%(548664) as seed from games where visible=1 order by seed limit 10
===== Monthly Random Playlist =====
And lastly for a monthly random playlist
select *,cast(strftime('%f',dateadded) as float)*gameid*gameid*cast(strftime('%m%Y','now') as int)%(548664) as seed from games where visible=1 order by seed limit 10
if you'd like to filter which emulators then you would need to find the EMUID #. (get that from emulator setup field)
Select * from Games where visible=1 AND EmuID in (1,3) order by random() Limit 5
That will grab random from emulators 1 or 3, and grab 5 tables in total.