29 November 2008

Radio Deluxe

We first heard John Pizzarelli several years ago on Marian McPartland's Piano Jazz, and we've been fans ever since. So I was surprised to learn about Pizzarelli's radio show, Radio Deluxe, when I read the interview in Jazz Times a couple months ago. Alas, no radio station in Chicago carries the show, but you can download episodes online.

Radio Deluxe is fantastic. Pizzarelli and his wife, Jessica Molaskey, host the two-hour show each week, and play whatever music they feel like playing. Huzzah! And the music they play is amazing. Plus there's a different theme every week. I love it!! I really have to wonder how they work out the licensing so they can post MP3s with all this great music. Hmm, maybe better not to ask too many questions.

So you can download the MP3 files from the web site, then import the files into iTunes, but what a pain. And the web site doesn't offer an RSS feed so you can subscribe to the podcast in iTunes and have it download and manage episodes automatically. Feh. So I wrote one myself.

While I didn't spend a whole lot of net time on it, it did take me these past couple months to make enough time to get it to work. I thought it would be a lot easier than it was. I expected to just write an XSL transformation and be done, but the page from the web site that claimed to be XHTML actually wasn't. Then I tried using Tidy to convert the source page to XHTML first, and that almost worked, but all the episode data ended up in a single CDATA section, inaccessible to XSL. I tried my hand at Groovy to transform the source page into an RSS feed, but I ran into issues with its XML capabilities. So I resorted to good old Java and DOM and some regular expressions, and that worked fine.

I tried to have iTunes read the RSS file from the hard drive, but it won't. Then I tried posting the file to Maria's web site, but her host doesn't allow RSS pages that refer to off-site content. That's a weird policy. I finally figured out that our ISP does allow some private web hosting, and that worked fine, after a call to tech support. Finally, iTunes was complaining that there weren't any playable episodes. Then I realized that, while the "enclosure" tag isn't required by the RSS 2.0 specification, it is required for iTunes to distinguish between audio content and other types of content (video, text, etc.). Once I added the "enclosure" tags, iTunes was happy, and so was I! Now I just run an Ant script to download the latest links from the Pizzarelli site, create the updated RSS page, and FTP it to our ISP. Yippee!

No comments: