If you want to do it in a PAL script:
Code:
var theSongChooser : TDataSet;
PAL.Loop := true;
//
// Choose a song less than 5 mintues (3000000 msec)
//
theSongChooser := Query('SELECT artist, title, filename, duration, id ' +
'FROM songlist ' +
'WHERE songtype = ''S'' ' +
'AND duration < ''300000'' ' +
'ORDER BY RAND() LIMIT 1', [], true);
//
// Add it to Queue
//
Queue.AddFile(theSongChooser['filename'], ipBottom);
WriteLn('Added: ' + QuotedStr(theSongChooser['artist']) + ' --- ' + QuotedStr(theSongChooser['title']));
WriteLN ( 'Duration: ' + IntToStr(theSongChooser['duration']) + ' milliseconds or ' + (FloatToStr(theSongChooser['duration']/60000)) + ' Minutes');
PAL.WaitForPlayCount(1);
_________________
- DJ Dee
- Spacial Volunteer Support (SVS)
- Custom PAL services:
www.palscripts.com-
http://www.AlternativeHD.com-
http://www.lahotcountry.com