by

Getting Zune recent, favorite, and artist info via RSS/Atom

Built-in playlists in the Zune ecosystem, such as “Recent Tracks” and "Favorites Tracks", can be consumed as Atom feeds at URLs such as:

http://socialapi.zune.net/members/98772405-3286-4e64-b78b-f7512f3804fe/playlists/BuiltIn-FavoriteTracks.

(See this post’s comments to learn more about the URL’s structure.)

Unfortunately there a couple usability problems with the feed as is:

  1. According to feedvalidator.org, an Atom namespace qualifier used on the <feed> element will cause interoperability problems. It’s perfectly valid XML and Atom 1.0 but some consumption code, including some I saw written at work the other day, is looking for <feed>, not <a:feed>. I suspect this is what throws off FriendFeed‘s Atom importer, as well as others.
  2. <entry><link> has an empty href attribute. Hey Zune team, remember that social I mentioned earlier? If you don’t link to it, customers ain’t joinin’ it.
  3. <entry><updated> is the feed-generated date/time, not the date/time the track was added to the list.
  4. Most things support Atom, but not everything.

So I fixed it up with Yahoo Pipes:

  1. I put an end to interoperability problems by sourcing the Atom feed in Pipes as raw XML, then spitting certain elements back out as RSS.
  2. I use the Zune Social XML namespace track information to link to track info on http://social.zune.net.
  3. There’s nothing much to be done about the date problem that I could see… that’s for the Zune folks to fix.
  4. Pipes exports as RSS. Easy.

The result is at http://pipes.yahoo.com/waded/zunefavorites.

Then, the improved RSS equivalent, with parameters you can change in bold, is:

http://pipes.yahoo.com/pipes/pipe.run?_id=4va_WrpV3RG7AfwEiXrL0A&_render=rss&mid=98772405-3286-4e64-b78b-f7512f3804fe&playlist=BuiltIn-FavoriteTracks

 

Write a Comment

Comment

13 Comments

  1. The only way I’m currently aware of is to use a network monitor utility (like Fiddler) to watch the Zune client’s communication with http://social.zune.net. You will see it calling the Atom feeds with your GUID. (It’ll call some feeds to get data about your friends, using their GUIDs, so look carefully at the calls.)

  2. After a little trial and error Fiddler worked like a charm for finding my Zune member GUID and your Yahoo Pipe worked as advertised. I’ve got recently listened to tracks on my lifestream. Thanks.

  3. Hey Ron, this is still working for me since the 3.0 update. What specifically changed? (Yes, Zune Cards are different, but it doesn’t seem to affect this pipe.)

    And Paul, thanks for finding that you can use your member name instead of a GUID. That works for me too.

  4. Sweet post, kudos, anyone know if its possible to use a wild card and get the aggregate from all users? so the top 5 most played tracks for example?

    Thanks

  5. Phil, thanks. Such data’s rendered at http://social.zune.net/music/ so it’s certainly aggregated, but I don’t know if it’s exposed via Atom protocol anywhere. I don’t have Zune client handy… doesn’t the same info show in Zune client? If so, the data must be visible on the wire, and IIRC all the data between Zune client & Zune service, except for streaming, is sitting on Atom.