Wuzzle Jukebox v1.1 12/2002 2 years later, and I finally update the download to the same version of the script I've been running for the last year. This is version 1.1 of the wuzzle jukebox, a sample of the jukebox running can be found at http://wuzzle.org/jukebox. That will usually be running the very latest version, so there may be some differences. WHAT The jukebox is a set of perl scripts which interface with a Database of mp3's to provide a web based mp3 browser. People can select specific songs or albums they want to hear and add them to a playlist. The playlist format is compatible with winamp, windows media player, and XMPP. Security is provided by a combination of server directory/file security, and a login page. The playlists contain usernames and password in them because of the stupidity of winamp. WHERE The scripts can be installed as any arbitrary user, as long as that user has write permissions on a jukebox database. Most of the settings can be set in the configuration file (jukeboxrc), which can be in a system location, or in the same directory as the script. WHY I couldn't find a jukebox interface that did even nearly what I was looking for, or was extensible enough to deal with the types of files I have. I wrote this jukebox with a few things in mind: a) Decouple the database maintenance and the browsing interface. Maintenance is done by a seperate command line script. b) Be able to extract song names from file names. Most mp3's nowadays are not named 1.mp3,2.mp3,3.mp3, they're generally named something like "artist - album - songname.mp3". The database update script can extract the names from filenames of this format (stripping 0,1,2, etc records (seperated by " - ") from the front of the filename). c) The albums and genres should not be directory based. HOW This script was written in Perl 5, using the DBI and CGI interfaces. You can get those from CPAN easily enough. There are two main programs: createdb.cgi: This is the command line database maintenance program. By default it drops all the tables in the database and recreates it from scratch. However, it has a few options: -c ConfigFile : Use a specific configfile. -U : Recreate all the table except the sessions one. (Keeps session info) -u : Don't recreate any tables, only update albums that have not previously been entered into the database. -p : Don't do anything to the database, only list directories without .info files. createdb should be run from the base directory of your archive (so that the paths would be correct if added onto $SONG_PRE. createdb.cgi will automatically detect if it's running as a command line or CGI and will present the user with a set of select boxes if it's on a web page. Protect it, since it doesn't do any username testing. index.cgi: This is the main jukebox program. WHO The script was written by Bryan Kilian (bryan@wuzzle.org). Any additions, suggestions, bug reports, etc. would be happily accepted. CONTENTS The contents of this archive should contain: -rw-r--r-- 1 root mp3 185 Dec 19 11:46 .htaccess.sample -rwxr-xr-x 1 root mp3 11130 Dec 19 11:28 createdb.cgi -rw-r--r-- 1 root mp3 1276 Dec 19 11:43 dotinfo.sample -rwxr-xr-x 1 root mp3 9344 Dec 19 11:28 index.cgi drwxr-xr-x 2 root mp3 512 Dec 19 11:28 jblib -rw-r--r-- 1 root mp3 1761 Dec 19 11:32 jukeboxrc -rw-r--r-- 1 root mp3 4183 Dec 19 11:56 readme.txt -rw-r--r-- 1 root mp3 1482 Dec 19 11:28 styles.css -rw-r--r-- 1 root mp3 181 Dec 19 11:48 versions -rwxr--r-- 1 root mp3 1365 Dec 19 11:28 view.gif jblib: -rw-r--r-- 1 root mp3 1098 Dec 19 11:28 dbdef.def -rw-r--r-- 1 root mp3 25060 Dec 19 11:28 pages.pl -rw-r--r-- 1 root mp3 2831 Dec 19 11:28 utils.pl The .htaccess.sample is a sample one I use to keep mp3 files from being world accessable. The dotinfo.sample is a sample one taken from a directory I have. It is commented. The rest is self explanatory. A number of things can be changed by purely playing with the style sheet, and view.gif should be in the same dir as the index.cgi.