public void SetPhotoCreationDate(PicasaEntry photo, DateTime creationDate) { //PhotoAccessor ac = new PhotoAccessor(photo); var longTime = (creationDate.ToUniversalTime().Subtract(new DateTime(1970, 1, 1))).TotalMilliseconds; //ac.Timestamp = Convert.ToUInt64(longTime); //photo.Published = creationDate.ToUniversalTime(); photo.SetPhotoExtensionValue("timestamp", Convert.ToUInt64(longTime).ToString()); try { PicasaEntry updatedEntry = (PicasaEntry)photo.Update(); } catch { var service = GetPicasaService(true); photo.Service = service; PicasaEntry updatedEntry = (PicasaEntry)photo.Update(); } }
public void MovePhotoToAlbum(PicasaEntry photo, string newAlbumId) { PhotoAccessor ac = new PhotoAccessor(photo); ac.AlbumId = newAlbumId; try { PicasaEntry updatedEntry = (PicasaEntry)photo.Update(); } catch { var service = GetPicasaService(true); photo.Service = service; PicasaEntry updatedEntry = (PicasaEntry)photo.Update(); } }