I have a python script designed to change the timestamp on videos (since 
Google Photos uploader uploads them with the wrong dates) and it works 
perfectly to change all the fields *except* for the timestamp. 
Unfortunately, it took me a long to realize this must be a server-side bug.

Here's an excerpt for reference:

print "Getting list of Albums..."

albums = gd_client.GetUserFeed()
for album in albums.entry:

  print "Getting list of", album.numphotos.text, "photos in Album", 
album.title.text 
  if album.title.text == 'Test':
    photos = 
gd_client.GetFeed('/data/feed/api/user/default/albumid/%s?kind=photo' % 
(album.gphoto_id.text))
    for photo in photos.entry:
        print '  Photo:', photo.title.text
  
        if photo.title.text and photo.timestamp.text and photo.size.text:
          if photo.title.text in filenames.keys():
            print "Filename match for", photo.title.text
            if int(photo.size.text) in filenames[photo.title.text].keys():
              print "  ...and a size match for ", photo.title.text
              print "    Existing date is ", photo.timestamp.text
              print "    Local date is ", 
filenames[photo.title.text][int(photo.size.text)]['date']
 
              photo.summary.text = u'a test'; 
              newtime = "%i" % 
(int(filenames[photo.title.text][int(photo.size.text)]['date'])*1000)
              photo.timestamp.text = str(newtime)

              print "    New db date will be", photo.timestamp.text, 
 
              try: 
                photo = gd_client.UpdatePhotoMetadata(photo)
                print "    New date submitted to Google", 
photo.timestamp.text,
              except:
                print "    **Update failed...**"
                pass
        else:
          print "Debug: Found photo",photo.title.text,"with no title, 
timestate and/or size. Skipping..."

-- 
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 https://groups.google.com/group/google-picasa-data-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to