PDC 2010 Session Downloader in Silverlight

I was struggling a little on the official PDC 2010 site to download all of the PowerPoints and videos I wanted and I scratched my head for a while before I found an OData feed which looked like it contained all the data I needed. That feed is at;

http://odata.microsoftpdc.com/

and I figured it wouldn’t be too much hassle to plug that into a Silverlight application that made it easier to do the downloading. I spent maybe a day on it during the rainy bits of the weekend and that application is running in the browser below and you should be able to click the button to install it locally.

Here’s the App – Click to Install

I apologise that the XAP file is about 1MB, I think I could make this a lot smaller by taking out some unused styles but I haven’t figured out exactly which styles are used/un-used at this point. I also left the blue spinning balls default loader on it Confused smile

This is an elevated out of browser application because as far as I can tell the site serving the feed doesn’t have a clientaccesspolicy.xml file and also because I wanted to be able to write files straight into “My Videos” and “My Documents” without having to ask the user on a per-file basis.

Here’s the Help File Smile

I’m not exactly the master of intuitive UI so here’s some quick instructions for use. Once you have the application installed you should see a screen like this;

image

with the circled tracks coming from the OData feed. When you click on a topic for the first time, the application goes back over OData;

image

and then should display the session list within that particular track;

image

You can then select which PowerPoints, High Def videos and Low Def videos you want to download.

Note – for the purposes of this app I only looked at the videos in MP4 format, I do not look for videos in WMV format and note also that not all sessions seem to have downloadable videos at this point.

You can make individual selections by just clicking on the content types – maybe I want Clemens’ session in High Def and I want the PowerPoints;

image

or you can use the big buttons at the bottom to try and do a “Select All” or “Clear All” on that particular content type – below I’m trying to download all the PowerPoints and all the Low Def videos from the “Framework & Tools” track;

image

Your selections should be remembered as you switch from track to track so you can go around this way building up a list of all the things that you want to download.

Once you’ve got that list, click the download button in the bottom right;

image

and the downloading dialog should pop up onto the screen and work should begin. It should progress like this;

image

showing you progress in terms of how many sessions it has completed, how many files (in total) it has completed, which session and file it’s working on right now and (potentially) the errors that it encounters along the way.

You can hit the Stop button and the downloads should stop with a set of “cancelled” errors for all the files/sessions that didn’t get completed.

A download should not (hopefully) leave a half-completed file on your disk and it should not (hopefully) overwrite any existing file on your disk.

Where are the downloaded files going? Into your My Documents and My Videos (PDC2010Low/PDC2010High) folders;

imageimage

and if you do encounter errors in there like (e.g.) here where I unplug the network cable part way through…

image

then you should get some attempt at error handling with a list of the problems encountered whilst doing the downloads.

Enjoy – feel free to ping me with bugs and I’ll try and fix and, remember, this is just for fun – it’s not part of the “official” PDC site in any way.

Update – a few people asked me to post the source code here and so here’s the code – some notes;

  1. This was written quickly. I’d guess I spent maybe 5-6 hours on it.
  2. I wasn’t planning to share it.
  3. It has some MVVM ideas in it but they’re not taken to the Nth degree. It uses some commanding from Expression Blend.
  4. There’s probably a race condition or two in there as well.
  5. There’s no unit tests. What testing I did was done in the debugger.
  6. There are probably a bunch of styles in there that aren’t used. I started with the JetPack styles and trimmed some bits out but I wasn’t exhaustive.
  7. There’s a lot of “public” that should be “internal” and the code generally needs splitting into libraries.

but you can download it from here if you still want that code to open up and poke around in after all those caveats Smile