peircej / jbrout

Automatically exported from code.google.com/p/jbrout
0 stars 0 forks source link

No filename on pictures uploaded through picasa plugin #169

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. select some pictures
2. upload them to a picasa account
3. check the picture informations on picasa web

What is the expected output? What do you see instead?
In "File Name" I'd expect to find the original file name, but no filename is 
present, the value is [UNSET]. Exif information are present, though. 

What version of the product are you using? On what operating system?
Jbrout SVN 307 + Rating patch from issue 95, running on Linux Ubuntu Jaunty

Please provide any additional information below.

Original issue reported on code.google.com by chartier...@gmail.com on 28 Sep 2010 at 9:13

GoogleCodeExporter commented 8 years ago
I believe it is a recent addition in picasaweb. Perhaps we should/could set it 
at upload time now.

Perhaps it's time to use gdata api instead of the current system ;-)

Original comment by manat...@gmail.com on 1 Oct 2010 at 2:16

GoogleCodeExporter commented 8 years ago
I couldn't tell whether this is new in PicasaWeb since I didn't use it before. 
I see the xml element used is <title> (and that the description isn't fed), 
maybe it should be something else. 

I don't think this has an impact, but the namespace used is slightly weird 
(http://www.temp.com).

I tried to have a look at 
http://code.google.com/intl/fr/apis/picasaweb/docs/2.0/reference.html#gphoto_ref
erence 
and 
http://code.google.com/intl/fr/apis/picasaweb/docs/2.0/developers_guide_protocol
.html#PostPhotoWithMetadata
but I didn't find something similar to the RSS xml used. 

About gdata API, the repository shows that tbenita updated the gdata and atom 
libs in 2009. Aren't they used at all ? 

Original comment by chartier...@gmail.com on 4 Oct 2010 at 8:46

GoogleCodeExporter commented 8 years ago
It seems it already uses gdata API. 

A quick test made it work, using: 

http://code.google.com/p/gdata-python-client/wiki/GDataMedia

Creating a Media Entry¶

There are two ways to create a media entry -- with and without metadata.

To create a new media entry without metadata, first create a MediaSource class 
and populate it with the source of your media:

ms = gdata.MediaSource()
ms.setFile('testimage.jpg', 'image/jpeg')

Then, POST this MediaSource class to the feed:

media_entry = gd_client.Post(None, albumFeedURL, media_source = ms)

Note that the 'data' field of the Post method is None, which indicates that we 
are not sending metadata along with the request. To send metadata along with 
the request, create an entry of the appropriate type, and include it in the 
Post method call:

new_media_entry = gdata.GDataEntry()
new_media_entry.title = atom.Title(text='testimage1.jpg')
new_media_entry.summary = atom.Summary(text='Test Image')
new_media_entry.category.append(atom.Category(scheme = 
'http://schemas.google.com/g/2005#kind', term = 
'http://schemas.google.com/photos/2007#photo'))
media_entry = gd_client.Post(new_media_entry, albumFeedURL, media_source = ms)

The entry returned is a GData Media entry containing links to the created 
media. 

I'll try to make a patch soon 

Original comment by chartier...@gmail.com on 4 Oct 2010 at 6:04

GoogleCodeExporter commented 8 years ago
Ok, here is a patch for r307. I also added the picture comment. Modif seems to 
work fine, I just hope I built the patch correctly. Let me know if I did not. 

Original comment by chartier...@gmail.com on 4 Oct 2010 at 6:46

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks françois, it worked fine (for me)

closed in r309

Original comment by manat...@gmail.com on 11 Oct 2010 at 6:05

GoogleCodeExporter commented 8 years ago
You're welcome ! 

Original comment by chartier...@gmail.com on 12 Oct 2010 at 1:34