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

by Wade on July 19, 2008

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

 

{ 13 comments… read them below or add one }

Thomas July 21, 2008 at 4:53 pm

Looks cool, but how do you find your Zune Member GUID?

Reply

Wade Dorrell July 22, 2008 at 1:52 pm

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.)

Reply

Leif902 July 23, 2008 at 5:37 am

Good idea; now if only MS would do something along these lines.

Reply

Thomas July 28, 2008 at 9:14 am

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.

Reply

Shawn September 11, 2008 at 6:56 am

Is there any easy way to find my Zune member id?

Reply

Paul Whitaker September 24, 2008 at 3:41 am

I was able to get it working with the text representation of my member id (whit98c).

Thanks for this! I added it to my friendfeed http://friendfeed.com/paulwhit
;)

Reply

Ron October 26, 2008 at 10:15 pm

Interesting find here, but…seems they’ve changed the way Zune Cards work since you did this…good ol’ MSFT.

Reply

Wade Dorrell November 15, 2008 at 7:20 am

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.

Reply

Jonathan December 6, 2008 at 12:06 am

It is nice that you can use your username now.

So there are three playlists

BuiltIn-RecentTracks
BuiltIn-FavoriteTracks
BuiltIn-MostPlayedArtists

i built a new yahoo pipes thingy for recent tracks, and added the date info.

http://pipes.yahoo.com/moonrakerpipes/zunerecenttracks

Reply

Jonathan December 6, 2008 at 3:04 pm

I updated the pipe to now insert a search link for songs that do not have the correct id values (they come up with all zeros).

http://pipes.yahoo.com/moonrakerpipes/zunerecenttracksandsearch

Reply

Phil August 5, 2009 at 1:57 am

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

Reply

Wade Dorrell August 8, 2009 at 12:26 am

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.

Reply

Thomas October 20, 2009 at 8:04 am

Hmmm, looks like with the release of Zune 4.0 something in the pipes have broken. The http://socialapi.zune.net Atom feed is still working. Any chance of a fix?

Reply

Leave a Comment

{ 5 trackbacks }

Previous post:

Next post: