I've updated the implementation of the Now Playing mechanism in the Dynoweb engine that I discussed in the previous post . The sidebar now shows the last 10 songs that have played, rather than just the last one, each with small album cover art instead of large.
The "Now Playing Monitor" AppleScript app did not have to change, since it is still just sending the basic song info, taken from iTunes, to the server: song title, artist name, album name, and Amazon ASIN album ID number.
On the server side I only had to make a couple of minor changes to keep track of the songs. Previously, the playlist was never saved; the current song info was just stashed in a known file as an HTML snippet. Now there is a database table to store the playlist history. The handler servlet grabs the request parameters and instead of formatting and writing them as the HTML snippet, it inserts an entity into the playlist table, queries for the last 10 songs, and writes their info to the snippet file. This way, the query is only performed when something is added to the table, rather than on every page request. The snippet file is still pulled in either by server-side include for static pages, or by Dynoweb variable element in the dynamic pages like this one.
To use the thumbnail images instead of the medium sized ones, you just use a different Amazon image URL, which you can see by looking at the source.
[2] Google: "arena music playlist"
[2] Google: "server side playlist"
[2] Google: "the police playlist"
[2] Google: "Arena Playlist"
[2] Google: "servlet "PlayList""
[1] Google: "arena playlist+song"
[1] Google: "itunes blog "last 10 songs""
[1] Google: "Arena Music"
[1] Google: "arena playlist"
[1] Google: "Arena Music Play List "