Skip to main content
Participating Frequently
May 11, 2022
Answered

Update dateTimeOriginal from plugins

  • May 11, 2022
  • 2 replies
  • 458 views

Hello,

 

I'm trying to set the dateTimeOriginal of a photo from a CSV file I have thanks to a plugins. On your SDK, on the photo:getRawMetadata I saw the field but I couldn't archieve to set with photo:setRawMetadata where I always have a LrPhoto:setRawMetadata: unknown metadata key "dateTimeOriginal".

 

How can I fix my plugins. Thanks a lot

 

This topic has been closed for replies.
Correct answer john beardsworth

The SDK does not support writing EXIF fields, only IPTC. That's why the documentation does not list that field in SetRawMetadata

2 replies

johnrellis
Legend
May 11, 2022

To build on that, plugins that want to set the capture date of photos do these steps:

 

1. photo:saveMetadata ()

 

2. Run the utility program Exiftool to set EXIF:DateTimeOriginal.

 

3. photo:readMetadata ()

john beardsworth
Community Expert
john beardsworthCommunity ExpertCorrect answer
Community Expert
May 11, 2022

The SDK does not support writing EXIF fields, only IPTC. That's why the documentation does not list that field in SetRawMetadata

FarnotsAuthor
Participating Frequently
May 25, 2022

Thanks a lot for your answer, that help a lot. I'll work directly with ExifTool as suggested by @johnrellis and update EXIF data after.