Linking a podcast to Zune

You may have notice that we now provide links to the usual RSS, iTunes, Google (Reader), Zune and pcast (for pcast:// compatible podcatchers):

Podcast links

All the links were trivial to make, except Zune. iTunes took long to have proper links, because you have to submit them to Apple and, obviously, they have to approve them.

Linking to Zune has many pitfalls. Hopefully you’ll read about them here and spend only a fraction of the time I’ve spent on creating them. The format is initially quite simple:

zune://subscribe/?title=url

My first try was to URL-encode both the title and the url which resulted in two undesirable behaviors:

  1. The title of the podcast on the Zune dialog appeared URL-encoded. That dialog that says “Do you want to subscribe the A%20Smart%20Bear podcast?”
  2. It didn’t work, it claimed the URL was broken.

I’ve tried not urlencoding and instead of saying “A%20Smart%20Bear” it was saying “A+Smart+Bear”, and still not working.

I was doing all my testing and debugging with Firefox. Not sure where to go next, I’ve tried Google Chrome which shows you the command line it is about to run. That command line included hyphens to specify the arguments.

Bingo! We had hyphens in our URL and that was breaking. Zune cannot deal with hyphens in the URL.

Our solution was to replace spaces for underscores in the title to reach what we think was the most readable solution:

  • A%20Smart%20Bear
  • A+Smart+Bear
  • ASmartBear
  • A_Smart_Bear

and to replace the hyphens in underscores in our URLs and everything just worked. Thankfully our use of hyphens is no critical and changing them to underscores didn’t require a single line of code, but it could have been much worst. This is something to have in mind when you are defining your routes.

Tags: , , , , , , ,

Leave a Reply

Blogger Character

Subscribe

Search


Recent Comments

  • Michele Vitale: hallo Pablo and Daniel, congrats for your post, I agree 100%...
  • pablo: As expected, Apple already broke the protocol for iTunes, so Palm Pre...

Categories


Archives