Standing on the shoulders of giants. RSS 2.0
# Wednesday, September 20, 2006

The best new feature in iTunes 7 is the cover art browser, the not so good feature is the fact that it doesn't work so good on Windows Vista. So after moving back to Mediaplayer and missing the cover art, which takes forever to download for a decent sized library in iTunes. I put together this codesnippet, which lets downloads the cover art from the iTunes store for the specified artist/album.

The interesting part is the headers you have to send with your request:

request.Headers.Add("X-Apple-Tz", "7200");
request.Headers.Add("X-Apple-Store-Front", "143457");
request.Headers.Add("Accept-Language", "en-us, en;q=0.50");
request.Headers.Add("Accept-Encoding", "gzip, x-aes-cbc");
request.UserAgent = "iTunes/7.0 (Macintosh; U; PPC Mac OS X 10.4.7)";
request.AutomaticDecompression = DecompressionMethods.GZip;

Also note that the HttpWebRequest class automatically decompresses the response.

Program.cs (3.44 KB)Program.txt (3.44 KB)

Note: this code is based on the perl library by Jesper Nøhr and works as long as Apple doesn't change anything.


Wednesday, September 20, 2006 3:38:22 PM (W. Europe Daylight Time, UTC+02:00)  #    Comments [2] - Trackback
Codesnippet | Fun
Wednesday, September 20, 2006 4:20:46 PM (W. Europe Daylight Time, UTC+02:00)
Can't seem to download your .cs file:

Description: The type of page you have requested is not served because it has been explicitly forbidden. The extension '.cs' may be incorrect. Please review the URL below and make sure that it is spelled correctly.

Cheers
Wednesday, September 20, 2006 4:33:49 PM (W. Europe Daylight Time, UTC+02:00)
Changed the extension to .txt.
paulb
Comments are closed.
About
© Copyright 2009
Paul van Brenk
Sign In
newtelligence dasBlog 2.3.8275.16006
All Content © 2009, Paul van Brenk
DasBlog theme 'Business' created by Christoph De Baene (delarou)