Project:Picasa
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:cyberswat
Status:closed (fixed)

Issue Summary

Follow the existing framework and import a users images as nodes in addition to the user and albums.

Comments

#1

Assigned to:Anonymous» hairymnstr

Latest CVS commit adds the picasa_photo module that imports individual images and allows users to browse them in Drupal. Needs more work smoothing out some rough edges but the basic framework is present.

#2

Very cool functionality! I can't wait to add this to my production sites! Overall it works pretty close to as I would expect.

One issue: when attempting to save a Guser after the initial creation (the second, third saves...), I end up getting a bunch of duplicate entry error messages. It looks like there is no 'update if already exists' functionality when populating the picasa_album and picasa_photo tables. There would probably be no need to save the Guser again, but it seems like we should have the ability to update the albums & photos in the drupal tables for a particular Guser.

If it helps, here's an example of the error message I get when re-saving a Guser:

user warning: Duplicate entry '5222666688701054353' for key 1 query: INSERT INTO picasa_albums (nid, vid, uid, guser_nid, id, updated, title, summary, rights, author_name, author_uri, gphoto_id, gphoto_name, gphoto_location, gphoto_access, gphoto_timestamp, gphoto_numphotos, gphoto_user, gphoto_nickname, media_title, media_description, media_keywords, media_content, media_thumbnail, media_credit, georss_pos ) VALUES (358, 358 ,1, 278,'http://picasaweb.google.com/data/entry/api/user/x/albumid/x', x, '2008', '2008 trip ', 'public', 'x', 'http://picasaweb.google.com/x', '5222666688701054353', '2008', 'MN', 'public', 1215932400, 10, 'x', 'x', '2008', '2008 trip', '', 'http://lh6.ggpht.com/x/SHqjrrhKvZE/AAAAAAAAAKc/CcATn8nry2Q/2008.jpg', 'http://lh6.ggpht.com/x/SHqjrrhKvZE/AAAAAAAAAKc/CcATn8nry2Q/s160-c/2008.jpg', 'x', '46.78796 -92.09984999999999') in /x/modules/picasa/picasa_album/picasa_album.module on line 69.

#3

After digging around, I was able to find the issue with updating the Guser. It mostly has to do with how the albums were being deleted prior to updating. Albums, photos and nodes were not getting deleted out of the data. This patch should delete the data when a Guser is updated so that new data can be added.

Three files are patched, picasa_guser.module, picasa_album.module, picasa_photo.module.

AttachmentSize
picasa_image_as_node_01.patch 1.9 KB

#4

gphoto_timestamp and exif_time passed from Picasa are in milliseconds according to the reference. I think we need them in just seconds.

http://code.google.com/apis/picasaweb/reference.html#gphoto_timestamp

I updated picasa_album.module to remove the milliseconds.

AttachmentSize
picasa_image_as_node_02.patch 1.37 KB

#5

This is a replacement of the patch I submitted in #3, I forgot to include the {} around the table names...

AttachmentSize
picasa_image_as_node_01a.patch 1.91 KB

#6

Assigned to:hairymnstr» cyberswat
Status:active» fixed

This has been resolved in the d6 dev branch

#7

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here