flingo64 / PhotoStation-Upload-Lr-Plugin

Photo StatLr (aka PhotoStation Upload) is a Lightroom Publish and Export Service Plugin that enables the export /publishing of photos and videos from Lr to a Synology Photo Station. It uploads the photos/videos and all required thumbnails. It can download comments and ratings and do a real two-way synch of various metadata (tags, ratings, labels).
http://messmer-online.de/index.php/software/11-photo-statlr
GNU General Public License v3.0
209 stars 21 forks source link

Photos without "DateTimeOriginal" and "DateTimeDigitized" has the wrong date #64

Closed poldixd closed 2 years ago

poldixd commented 2 years ago

Hey Martin,

at first: Thank you for your work on this awesome plugin.

My lightroom library contains photos of my canon camera and from my iPhone. My goal is it, to split the library. The canon camera photos should be still in the lightroom library and the iPhone photos should go into my Photostation. The plugin works like a charm!

But around 3k photos have not the correct date. The photos are taken in 2015 and the diskstation put the photos on that day I uploaded it to the diskstation.

So I checked out the exif data of the photos and the photos have no DateTimeOriginal or DateTimeDigitized field. Maybe the photos were send on Whatsapp to me. I don't know. Here are some screenshots:

image

The left photo becomes the actual date when it's uploaded. The right photo becomes the 26.07.2014.

Lightroom has the correct date and time for the left photo:

image

Maybe lightroom takes the "Änderungsdatum" for the photo, when no other date/time field is present?

image

Here are the logs (I've waited until the indexer service was compleded on the diskstation)

Photo without "DateTimeOriginal" and "DateTimeDigitized"

11:04:15, TRACE: getFolderId(userid:nils, path '/iPhone_Test/2015/2015-06-18') returns '1983' (after cache update and successful folder creation)
11:04:15, TRACE:    fileCreationDate: 2020-08-18 18:59:18
image

Photo with"DateTimeOriginal" and "DateTimeDigitized"

11:04:11, TRACE: getFolderId(userid:nils, path '/iPhone_Test/2014/2014-07-26') returns '1981' (after cache update and successful folder creation)
11:04:11, TRACE: getDateTimeOriginal(): dateTimeOriginal found 
11:04:11, TRACE:    dateTimeOriginal: 2014-07-26 18:09:44
image

Maybe the photo station will take the "Änderungsdatum" and not the "Erstellungsdatum"?

flingo64 commented 2 years ago

If no metadata regarding capture date is available, things become a little tricky:

This worked fine for Photo Station, but as I just checked this no longer works for Photos: if no capture metadata is available, Photos will use the upload timestamp as capture date regardless of the setting in the Photo StatLr Export/Publish service. This is clearly a bug in Photo StatLr and I have to think of a solution for this situation.

Anyway this won't be the date you are expecting to see, but there is a workaround in Lr:

poldixd commented 2 years ago

Thanks for your answer.

I don't know why the modify date is older than the creation date. In my Lightroom Version I can't add +1 seconds to a list of photos. I can only set the exact time and date. If I set a new exact date lightroom don't update the "DateTimeOriginal" exif field.

But I found a new way to set the "DateTimeOriginal" exif field: I can use the exif tool to copy the modify date to the "DateTimeOriginal"

exiftool IMG_3028.JPG "-DateTimeOriginal<FileModifyDate"

When I import the MG_3028.JPG it imports the image with the right capture date.

Now I have to find the 3k photos without a "DateTimeOriginal" exif field. I will publish the code in this issue.

flingo64 commented 2 years ago

In my Lightroom Version I can't add +1 seconds to a list of photos. I can only set the exact time and date. This is exactly how you do it: select all filtered photos and do an exact time/date update for the most selected photo. Lr is smart enough to apply the same time difference (not the exact date) to all selected photos. exiftool is also a way to do it, but remember you have to update the metadata of all photos in Lr also: search all photos w/ metadata out-of-sync and do read metadata from file