-
Notifications
You must be signed in to change notification settings - Fork 210
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
Feature/clear date time tag priority #891
Feature/clear date time tag priority #891
Conversation
…ature/Clear-DateTime-Tag-Priority
…pigallery2 into feature/Clear-DateTime-Tag-Priority
…ature/Clear-DateTime-Tag-Priority
//This is the PRIORITIZED LIST of tags which Pigallery2 uses to determine the date of creation of pictures. | ||
//The list is used for embedded picture metadata and xmp-sidecar files for both pictures and vidoes. | ||
|
||
export const DateTags: [string, string, string][] = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add documentation or better typing about the DateTag type here.
I would just probably declare a type timesptamp = string, typeoffset= string, etc..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. I made a commit with something that looks a bit like that. Can be changed of course. Let me know ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you, its way easier to understand.
Thank you! This is a very nice addition! |
Rewrite of metadata date handling. Since there are over 150 different date/timestamp tags, some new requirements will probably pop up over time.
In the effort of keeping MetadataLoader relatively simple, this PR adds a simple list of tags (in the notation of the exifr library) in a stand-alone file
src/backend/model/fileaccess/MetadataCreationDate.ts
The list is a prioritized list of tags that MetadataLoader is using to lookup
creationDate
andcreationDateOffset
. The first one found is used. If it does not contain offset, offset will be searched for in other tags under the conditions that these timestamps are close enough to the first.The new solution allows any contributer to add more tags to the list or change the priority of the tags (if there is a good reason). The priority currently used, puts standardised exif first and has photoshop shortly after and leaves various modification dates at the bottom, since modification can be done long time after creation.
As before side car metadata are loaded last, which means that sidecar data will "overwrite" embedded data in Pigallery2's metadata (not in the real photos).
flatxmp.xmp
, which has now been fixed.Also added some more test data