-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Metadata: Extract date from android whats app filenames #1102
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
Comments
PhotoPrism already uses the filename and the folder path to determine the date in case there is no taken at in other metadata like exif. That's why the month and year are set correctly in your example. |
Given that whatsapp photos are likely to be quite common, would this be considered a bug or a FR if PP doesn't recognize the date from their filename correctly? |
Yes, we should definitely add it. Is this the only naming pattern that causes issues for you? |
Acceptance Criteria:
|
I have seen the same thing with my files after I ran the
I'm trying to run optimize now to see if that helps. I'm using version |
The optimize command didnt do anything. Hoped it would try to fix some of the dates based on file name. Would another index help? |
Only indexing will change the taken at time if there is new / different metadata. Optimize mainly updates automatically generated titles, descriptions and LOCATION estimates. |
Great. Ill try a reindex and see if it changes. Thanks |
I'm running a index now and see.
As an example my path is Found the place where its checking for time. photoprism/internal/photoprism/mediafile.go Line 110 in 5be456a
My case end in the statement at line 153. photoprism/pkg/txt/time_test.go Line 45 in 5be456a
|
Hello, is there anything new about this issue ? PhotoPrism still doesn't correctly parse dates from WhatsApp filenames. For instance : |
Is this the standard for WhatsApp? Documentation? Haven't seen a filename like in your example before. See public roadmap and release notes for what we are working on right now. |
All my WhatsApp Filenames are in that format aswell |
Might be worth asking Facebook to implement filename settings if that doesn't exist yet. |
As a workaround, before importing WhatsApp photo, I'm using exiftool to batch set the date taken meta field from the file name with the following command:
Also sometimes I find that the date modified meta data is close to the date taken meta field. I guess the date modified might be the timestamp when WhatsApp downloaded the file locally on the client/smartphone. In that case the following command might be used: |
I'm using this script to watch the imports directory and rename any incoming files that match the WhatsApp pattern folder_to_watch="/opt/media/photos_import"
|
With the latest preview build, PhotoPrism automatically reads the date from WhatsApp filenames. Thank you very much @Bur0k ❤️ |
I've been doing some tests on various photos and I've found that PP gets confused with date extraction sometimes.
For example, this file seems to have no embedded "Date Taken" info:
When importing it, PP sets the right month and year, but sets the date for it (and all the other images from whatsapp) as the 1st:
I wondered what source PP is using for date information when the exif data doesn't provide it? Is it running a regex on the filename? Or Possibly on the folder path?
I know that finding dates for photos that lack proper exif data is a can of worms, as they can come in all types and formats. Given that Whatsapp will be a major source of photos for some libraries, and given it seems to strip that info though, I wondered if we can extract it with a regex looking for a few standard date formats in the file name?
The text was updated successfully, but these errors were encountered: