Prev Previous Post   Next Post Next
Old 12th June 2003, 17:38   #16
Enrico Ng
Junior Member
 
Join Date: Jun 2003
Posts: 24
I was thinking I would have a "real" playlist that I would use for adding files, etc. Then when my (update) script runs, it reads this playlist and generates a shuffled one.
Then My (web) script will read the "real" playlist file for the list. Then when a request is made, I move the songs played songs to the bottom of the list and stick the requested one on top. I may also index my "real" playlist with numbers, then save a list of numbers after it is randomized to make things easier.
If my play list is 10 hours long, the (update) script will run every 10 hours, so it is still randomized at the same time even if a request is made.
The only problem is that when randomizing every 10 hours, its possible that the same song can be played twice, but I can make my script smarter to check for this.
Of course things can get tricky if my script is running on the last second of a song. But these are all rare occurances.

Also, with this "real" playlist, I can include other data like how often it is requested or how often it is skipped.
Enrico Ng is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump