
The Web Interface
221
Chapter 10, Access Your Entire Media Collection Over the Internet
It’s nice to do a little branching on the number of albums to add a tool
tip that’s intelligent. The script shouldn’t say, “Click here to listen to all 1
albums.”
<% If intAlbumCount = 1 Then %>
title='Click to see the <%= intAlbumCount %> album.'>
<% Else %>
title='Click to see all <%= intAlbumCount %> albums.'>
<% End If %>
<%= objArtist.Name %> (<%= intAlbumCount %>)<br>
</a>
<% Next
Finally, you destroy the objects you created, since you’re done with them.
'Clean up
Set objFSO = Nothing
Set objArtist = Nothing
End Sub
The DisplayAlbums(strArtist) subroutine is mechanically similar to
DisplayArtists(), but has a different purpose. You’ll use it to display all the
albums and the songs on each album for whichever artist is passed as the
argument.
The first thing to do in this script is create a heading for the page with the
name of the specified artist and link it to a function that creates a playlist
for all the songs by that artist.
<a href='<%= strScriptName %>?action=play&type=artist&artist=<%=
strArtist %>'
title='Click here to play all songs by this artist.'>
<%= strArtist %>
Here you can see that the action is play, the type is artist, and the artist
is the artist whose albums you’re looking at.
Next, you loop through the subfolders in the artist’s folder and create a li ...