Skip to Main Content
Home Hacking Projects for Geeks
book

Home Hacking Projects for Geeks

by Eric Faulkner, Tony Northrup
December 2004
Beginner content levelBeginner
336 pages
14h 32m
English
O'Reilly Media, Inc.
Content preview from Home Hacking Projects for Geeks
226
Part II: Home Entertainment
QueryString("song"))
End Select
End Select
End If
%>
</body>
</html>
Exhibit B: display.asp
<%
Sub DisplayArtists()
Dim objFSO ' File system object
Dim objArtist ' Artist folder object
Dim strScriptName ' Name of parent script
Dim intAlbumCount ' Placeholder for number of album
subfolders for each artist
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
strScriptName = Request.ServerVariables("SCRIPT_NAME")
For Each objArtist in objFSO.GetFolder(MEDIA_LIBRARY_PATH).
Subfolders
intAlbumCount = objArtist.SubFolders.Count %>
<a href='<%= strScriptName %>?action=artist&artist=<%=
objArtist.Name %>'
<% 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
'Clean up
Set objFSO = Nothing
Set objArtist = Nothing
End Sub
Sub DisplayAlbums(strArtist)
Dim objFSO ' File system object
Dim objAlbum ' Artist folder object
Dim objSong ' Song file object
Dim strScriptName ' Name of parent script
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
strScriptName = Request.ServerVariables("SCRIPT_NAME")
%>
<h3>
<a href='<%= strScriptName %>?action=play&type=artist&artis
t=<%= strArtist %>'
Exhibit B
hhpg.indb 226
11/24/2004 1:56:12 PM
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Home Theater Hacks

Home Theater Hacks

Brett McLaughlin
Raspberry Pi 3 Home Automation Projects

Raspberry Pi 3 Home Automation Projects

Shantanu Bhadoria, Ruben Oliva Ramos
Linux Server Hacks, Volume Two

Linux Server Hacks, Volume Two

William von Hagen, Brian K. Jones

Publisher Resources

ISBN: 0596004052Catalog PageErrata