Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exit data exists but change date is wrong #4

Open
lublak opened this issue Nov 1, 2022 · 3 comments
Open

Exit data exists but change date is wrong #4

lublak opened this issue Nov 1, 2022 · 3 comments

Comments

@lublak
Copy link

lublak commented Nov 1, 2022

Hi.
Some images have some issues with: exif data exists but the change date is wrong. Most files a fixed with the script but if the exif data exists it's just ignores the file.

It would be useful to check if the exif data is correct based on the file name + if it's correct use the exif information to change the last change date.
If it's not correct: Replace the exif data (and change the last change date)

lublak added a commit to lublak/whatsapp-media-tools that referenced this issue Nov 2, 2022
@ikaruswill
Copy link
Owner

It's hard to say which is the source of truth here.

The initial idea was to just set the exif date if it has been stripped by WhatsApp.

The initial idea of the logic is:

  • If the exif date exists, it is taken as the source of truth since exif is the most reliable as compared to the filename or modified date. Hence it's skipped if exists.
  • If the exif date does not exist, the photo date is inferred from the filename
  • Modified date is never used since modified date is always unreliable as it depends on whether a restore was performed, where newly restored files have modified dates set to the time of restoration (file creation)

Correct me if I'm wrong but what you're suggesting here is:

  • check if the exif date and see if it identical to the filename's date.
  • if it isn't the same, take the filename as the source of truth

In this case, filename would become the source of truth, which differs from the original order of precedence.

What I'd like to know is, based on your experience, when would there be a case where exif date is not correct (and thus less reliable than WhatsApp filename dates?

@lublak
Copy link
Author

lublak commented Nov 2, 2022

@ikaruswill I have not yet had this case myself. I had until now only the case that exif data exisitieren but the "change date" is wrong and thus my gallery is completely unsorted. The other option I thought would only be handy if someone has the problem.

Gladly we can take that out again because I myself do not need it. Or an extra flag.

@lublak
Copy link
Author

lublak commented Nov 2, 2022

I have added a flag for now. @ikaruswill

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants