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.