Mike Taulty's Blog
Bits and Bytes from Microsoft UK
PDC 2010 Session Downloader in Silverlight

Blogs

Mike Taulty's Blog

Elsewhere

Archives

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


Posted Sun, Nov 7 2010 11:41 PM by mtaulty
Filed under: , ,

Comments

Dave wrote re: PDC 2010 Session Downloader in Silverlight
on Mon, Nov 8 2010 10:29 AM

This may be a bug --- I chose to download all the Cloud High Def videos.  When I started the counter started saying "Downloaded 11 Sessions"  eventhough it was on the first session.

Do you plan on releasing the code for this?

Greg wrote re: PDC 2010 Session Downloader in Silverlight
on Mon, Nov 8 2010 10:53 AM

Same sh*** of PDC download problem year after year.

Mike, can you tell me why Microsoft is not able to provide a clean and simple solution for this issue on the pdc website with all their tools (Silverlight?) and developers?

What's going wrong there?

Anonymous wrote re: PDC 2010 Session Downloader in Silverlight
on Mon, Nov 8 2010 11:07 AM

Great, now if someone can fix the audio/video sync issues. Mark Russinovich's excellent sessions on Windows memory management for instance.

sarmaad wrote re: PDC 2010 Session Downloader in Silverlight
on Mon, Nov 8 2010 11:17 AM

nice work...

are you willing to share the source code to see what's under the hood.

thanks.

sarmaad

mtaulty wrote re: PDC 2010 Session Downloader in Silverlight
on Mon, Nov 8 2010 11:38 AM

On the code - it's not entirely "tidy" but I guess I could release it.

On the bug - I'll try and repro that here and post an update if I can repro and fix.

Mike.

mtaulty wrote re: PDC 2010 Session Downloader in Silverlight
on Mon, Nov 8 2010 11:50 AM

Dave,

In your scenario what the client is doing is saying "I have downloaded everything you asked me to download for these 11 sessions" because if you ask for HighDef only then there's no HighDef for 11 of the sessions.

I'll see if I can update that!

Mike.

Shahnawaz wrote re: PDC 2010 Session Downloader in Silverlight
on Mon, Nov 8 2010 12:27 PM

Nice work! Mike,

I am also interested in the code for the application, please release it quickly if you ever wish to.

Thanks!

mtaulty wrote re: PDC 2010 Session Downloader in Silverlight
on Mon, Nov 8 2010 1:04 PM

Dave,

I updated the XAP. I should have built auto-update into it but you'll have to uninstall and reinstall.

( I don't have a proper code-signing cert for the auto-update ).

Mike.

Mike Apken wrote re: PDC 2010 Session Downloader in Silverlight
on Mon, Nov 8 2010 1:31 PM

Release the code.  We understand that the code is not "pretty" yet.  When trying to learn new areas we all go through that. There are great learning opportunities in this sample application.   You are busy and may never have a chance to "pretty" it up and that chance at learning how to do this will be missed by all.

Thanks for you hard work.

Tech Ed wrote re: PDC 2010 Session Downloader in Silverlight
on Mon, Nov 8 2010 1:53 PM

Great tool, it would be great to have one also for me ;)

Dave wrote re: PDC 2010 Session Downloader in Silverlight
on Mon, Nov 8 2010 2:12 PM

Great Thanks!  

alessandro wrote re: PDC 2010 Session Downloader in Silverlight
on Mon, Nov 8 2010 4:05 PM

Mike, great idea. I love  your app! Thanks

Kamran wrote re: PDC 2010 Session Downloader in Silverlight
on Mon, Nov 8 2010 6:25 PM

Thanks Mike.

Mark wrote re: PDC 2010 Session Downloader in Silverlight
on Mon, Nov 8 2010 8:18 PM

Excellent, that PDC site is very frustrating.

Dajgco wrote re: PDC 2010 Session Downloader in Silverlight
on Mon, Nov 8 2010 9:30 PM

thanks :)

Mike Apken wrote re: PDC 2010 Session Downloader in Silverlight
on Mon, Nov 8 2010 11:58 PM

Thanks for the code.  

Marc Roussel wrote re: PDC 2010 Session Downloader in Silverlight
on Tue, Nov 9 2010 12:13 AM

I sugest you to add a little checkbox on each one so we can select those we just want to download

Let say I just want to download the channel 9 videos about Silverlight.  

Steve Strong wrote re: PDC 2010 Session Downloader in Silverlight
on Tue, Nov 9 2010 2:08 AM

Thanks for the source code,  it's is awesome that you took the time to write it.  I hope to see you at mix,  thanks again.

Chris wrote re: PDC 2010 Session Downloader in Silverlight
on Tue, Nov 9 2010 3:28 AM

Is there any timeframe on when we can download all the sessions?  Watching in the silverlight player is extremely frustrating as you can watch 5 seconds at a time and then it pauses for buffering (I have a 20Mbit/sec connection and can download from other sites at 2000 kb/s).

Przemo wrote re: PDC 2010 Session Downloader in Silverlight
on Tue, Nov 9 2010 8:44 AM

Nice App, Thank You !

mtaulty wrote re: PDC 2010 Session Downloader in Silverlight
on Tue, Nov 9 2010 9:33 AM

Marc - I only have the 4 tracks to go off although I think you might be right in thinking that there are some additional tags on the sessions so that might be a different way of grouping the sessions.

I currently demand load the session data as you visit a track but what I could do is load all the session data up front and then let you filter it by track/tag/content type.

Probably would have made for a better experience - good idea :-)

Chris - I don't know when all the downloads will be there. I'm a little bit separated from the folks that actually own the PDC site.

Mike.

sarmaad wrote re: PDC 2010 Session Downloader in Silverlight
on Tue, Nov 9 2010 12:37 PM

Mike... thank you for the code.

it will serve as a good learning tool.

Matt Phillips wrote re: PDC 2010 Session Downloader in Silverlight
on Tue, Nov 9 2010 2:59 PM

Nice tool.

Are the missing videos ever going to become un-missing in the feed? IE isit worth me waiting for trying to look for the ones I want?

Matt

mtaulty wrote re: PDC 2010 Session Downloader in Silverlight
on Tue, Nov 9 2010 3:19 PM

Matt,

Not sure - it looks like the feed that I'm reading from does contain the same data as the live site from the brief check that I've done.

Mike.

Leandro wrote re: PDC 2010 Session Downloader in Silverlight
on Tue, Nov 9 2010 8:49 PM

NICE !!!!!

THANKS MIKE !

Richard Reukema wrote re: PDC 2010 Session Downloader in Silverlight
on Tue, Nov 9 2010 9:20 PM

Mike - I hate you!  You are setting a new standard for productivity for Silverlight developers!!! :)

Awesome work - You have inspired me to how quickly something can be done in Silverlight when you have in-depth knowledge of the product and libraries.  I need to do better!

mtaulty wrote re: PDC 2010 Session Downloader in Silverlight
on Tue, Nov 9 2010 10:57 PM

Richard,

I hate you too ;-)

Mike.

Eric wrote re: PDC 2010 Session Downloader in Silverlight
on Wed, Nov 10 2010 2:23 PM

Mike,

Thanks for the app!

One bug of note: Downloads will not work on XP/2003 due to the fact that OS versions prior to Vista do not have an entry for "My Video" in HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders, causing a NullReference exception.

For those needing a workaround, just manually create this key and set the value to an existing folder on your file system (in or outside your profile).

bluejay wrote re: PDC 2010 Session Downloader in Silverlight
on Wed, Nov 10 2010 3:07 PM

My thoughts - why aren't these videos just available through Zune?

Mike Ormond's Blog wrote PDC 10 Sessions–The Pick of the Bunch
on Fri, Nov 12 2010 6:02 PM

I’ve created a list of my favourite PDC10 videos for next week’s MSDN Flash and thought I’d share it

Sudhakar wrote re: PDC 2010 Session Downloader in Silverlight
on Sun, Nov 14 2010 7:03 AM

Lovely app...Would want one optimized for Windows Phone 7 too...please :-)

Oneda wrote Aconteceu no Twitter 42 - 07/11/10 a 13/11/10
on Sun, Nov 14 2010 5:31 PM

Aconteceu no Twitter 42 - 07/11/10 a 13/11/10

smartbike wrote re: PDC 2010 Session Downloader in Silverlight
on Sat, Nov 20 2010 4:01 AM

Thanks for the code. Well done!