View Single Post
Old 21st August 2010, 01:36   #297
Senior Member
Join Date: Jun 2001
Location: Victoria, B.C. Canada
Posts: 124
Send a message via ICQ to Rothgar Send a message via AIM to Rothgar
Well that is a bit weird that script.

I would probably use MySQL for my solution.

I would then structure it similar to like SAM in this example:

"Music Library" database, which would be populated by a separate script which would hopefully check IDv3 tags and add in "Artist", "Title" and "Filename".

"History" database which would add the tracks as it passes it to sc_trans and would store the similar details. Or maybe this could be added to the "Music Library" databse but might be more flexible separately. This would have a timestamp of last played. This way you can add this as a check to make sure it hasn't been played recently or even make some smarts for checking whether an Artist has been played recently. I would maybe add also a "Request" status to determine whether it was a requested song or not.

"Request" database which would have a list of "Current" requested songs that need to be played.

There would then be a script on the website that allowed 1 request every X minutes, maybe checking certain things such as if a "Artist" had been recently played. Then it adds it to the "Request" database.

In the "Playlist" script it would query for if there is anything in the "Request" database and if so queue it for play and then remove from the "Request" database otherwise randomly select a track from the "Music Library".

Of course there needs to be various smarts written into these scripts but that is the general idea.

Dawgclan Network
Genre: Rap/Hip-Hop
Rothgar is offline