View Full Version : Get covers from amazon.com like in Amarok

17th April 2008, 12:44
Like in Amarok I would like adding to my application the possibility to download covers from Amazon.com.

Looking amarok source code I have extracted the needed code (little modified):

// Static license Key. Thanks hydrogen ;-)
const QString LICENSE( "11ZKJS8X1ETSTJ6MT802" );
QString url;
url = "http://ecs.amazonaws.com"
+ "/onca/xml?Service=AWSECommerceService&Version=2007-10-29&Operation=ItemSearch&AssociateTag=webservices-20&AWSAccessKeyId=" + LICENSE
+ "&Keywords=" + searchString()
+ "&SearchIndex=VideoGames&ResponseGroup=Small,Images";

Pasting the code in a browser works. Now I have two questions?

1) Is the service free? Can I use the code like it is or it is needed a registration and a personal/application license?

2) Images have two white vertical stripes left and right to the cover; which method should I use for crop them and have a qpixmap with only the cover?


18th April 2008, 01:33
What I don't understand is why there is a SearchIndex=VideoGames in that link. Shouldn't we be looking for music? Indeed it seems it returns only video game covers. Changing that to Music works much better.

18th April 2008, 08:29
Why I should change that? I never said that my application is a clone of amarok. Infact, I need game covers so the code is right. The problems are others...