I fixed my previous issue - I found the 'updateMedia' API, so I can now 
update new content for the image. Woot!

I have a new query (hopefully the last): I want to upload a photo, and 
explicitly set the updated date/time myself - i.e., to the lastModified 
time of the photo I'm updating. This is so that when checking which images 
need to be updated, I can compare the lastUpdated time with the 
lastModified time of the local image, and only download/upload if they're 
different. 

However, even if I explicitly set the time with the code below, the 
lastUpdate time (when I next query the photo data) comes back as the upload 
time, not the time of the file. 

MediaFileSource myMedia = new MediaFileSource(imageFile, "image/jpeg");

myPhoto.setMediaSource(myMedia);

myPhoto.setClient(SYNC_CLIENT_NAME);

DateTime time = new DateTime( imageFile.lastModified() );

time.setTzShift(0);

myPhoto.setUpdated( time );


try{

    myPhoto = myPhoto.updateMedia(true);

    myPhoto.update();


} catch (Exception ex) {

    log.error("Unable to add media: " + imageFile + ": " + ex);

}


Is this the right approach? Or if there's no way for me to explicitly 
change the updatedDate on the PhotoEntry, is there a better date I should 
be looking at (e.g., the PublishedDate).

-- 
You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-picasa-data-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to