Chapter 10, Access Your Entire Media Collection Over the Internet
• Another idea would be to keep track of usage data. Would you like to
know your own personal top ten? It wouldn’t take much to coax the
playlist generator functions to keep track of stuff like that.
• You could also place a real database between the files and the applica-
tion, allowing you to keep track of all kinds of things. Doing so makes
it easy to create playlists based on anything from genre to “songs that
start with Q.”
• Lastly, because I wanted to make it as generic as possible, this project
only plays MP3 files. But because your site is for your own personal use,
you get to call the shots and can easily add other media formats. For
example, you could modify the display and playlist routines to allow
files with an .OGG extension; if you prefer Windows Media Audio files,
add those. This is your site; make it do whatever you want it to.
Exhibit A: default.asp
<%@ LANGUAGE=VBScript %>
<% Option Explicit %>
<!-- #INCLUDE FILE="playlist.asp" -->
<!-- #INCLUDE FILE="display.asp" -->
Const MEDIA_LIBRARY_URL = "mp3"
Const MEDIA_LIBRARY_PATH = "c:\media_library"
Const TEMP_URL = "temp"
Const TEMP_PATH = "c:\inetpub\wwwroot\temp"
<title>Homehacking MP3 Jukebox for Geeks</title>
If Request.QueryString.Count = 0 Then
Select Case Request.QueryString("action")
Select Case Request.QueryString("type")
QueryString("artist"), Request.QueryString("album"), Request.
11/24/2004 1:56:12 PM