[Ocs] problem adding a content with a download
Frank Karlitschek
karlitschek at kde.org
Wed Aug 25 14:52:24 PDT 2010
Hi Mat,
this is strange. I can´t reproduce the error.
Do you have the actual url you are calling and the POST parameters?
This would help me a lot to debug this.
Thanks and sorry for the problem.
Cheers
Frank
On 25.08.2010, at 00:53, Mateu Batle wrote:
> Hi Frank,
>
> can you give a quick look to the code below to check if I'm missing
> something here.
> I want to create a new content with a download of type package download.
> The new content gets added but the download is never reported from the
> server.
> I have tried with downloadtype 0 and 2 (although I guess type 2 for
> packages is not implemented yet)
>
> Also I don't get the video links, are they implemented ?
>
> cheers
> Mat
>
>
> Attica::Content content;
> content.addAttribute("downloadtyp1", "0");
> content.addAttribute("downloadname1", "download name 1");
> content.addAttribute("downloadlink1", "");
> content.addAttribute("downloaddistributiontype1", "MeeGo");
> content.addAttribute("downloadbuy1", "0");
> content.addAttribute("downloadbuyreason1", "buy buy buy");
> content.addAttribute("downloadbuyprice1", "100");
> content.addAttribute("downloadgpgfingerprint1", "6AD9 150F D8CC 941B
> 4541 2DCC 68B7 AB89 5754 8D2D");
> content.addAttribute("downloadgpgsignature1",
> "iEYEABECAAYFAkxT52oACgkQMNASEGDVgdegPAbDSMHn/xDQCfSplogMr9x0G0ZNqMUAn3WLVmXADVzWdEToTJ8B5wpdm3zb=A6Dy");
> content.addAttribute("downloadpackagename1", "gdb-gdbserver");
> content.addAttribute("downloadpackagerepository1", "");
> content.addAttribute("description", "a description");
> content.setName("awesome app 2");
> content.addAttribute("version", "1.0");
> content.addAttribute("summary", "a summary");
> content.addAttribute("licensetype", "2");
> content.addAttribute("license", "");
> content.addAttribute("feedbackurl", "http://www.meego.com/");
> content.addAttribute("video1",
> "http://mirror.bigbuckbunny.de/peach/bigbuckbunny_movies/big_buck_bunny_480p_stereo.ogg");
> content.addAttribute("changelog", "a changelog");
> Attica::ItemPostJob<Attica::Content> * addContentJob =
> provider.addNewContent(category, content);
>
> _______________________________________________
> Ocs mailing list
> Ocs at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/ocs
--
Frank Karlitschek
karlitschek at kde.org
More information about the Ocs
mailing list