This is a very old mod, but I wanted the ability to randomize songs without creating 200 million m3u files.
This version requires that you have a folder titled "playlists" which is writable by IUSR. I also added the ability to separate music by genre (17 types). When you choose a new genre, the table is created for it. The benefit of this is so members can choose to listen to music by genre or by "all". The drop-down menu that will appear on "default.asp" is automatically populated by the existing music tables (one for each genre). If a table hasn't been created, it won't show up as an option.
You have two methods to add mp3s to the database.
(1) Using
"admin_playlist.asp", create the necessary table by clicking the reset button. Then you must manually enter your mp3 paths.
(2) If you want to use FileSystemObject to automatically create your list from a music folder, simply enter in the folder name (the folder must exist below your forum either physically or virtually) where it says "populate from directory". You can also append to existing table by later adding another folder - simply select the radio button to ensure it doesn't restart your table.
After the mp3 paths are added, a randomized m3u file will be created and named with the member's ID for anyone who plays the radio.
Note: I made some big improvements to this yesterday, added song durations and more. Moved the configuration to the admin page, so you can set time limits/song limits/looping, all from the admin page. If you set time limit to 0, it's infinite. Any other value, the time limit will take precedence over the song quantity. Thus, if you set the time limit to 60 minutes, the program will quit adding songs to the playlist when the total duration exceeds 1 hour. If the song limit is set higher than the total song quantity in the table, the limit will be automatically decreased during the playlist creation.
Just discovered that the song length detection will not work on virtualized Windows hosts. It will still add the songs, but although the song limit still works, the time limit will not work.