Closed odedia closed 1 month ago
I've replicated this. The export_aae
part of the code just copies the AAE file but doesn't check if it exists first. There's not a way for OSXPhotos to know if the AAE changed or not currently. It could theoretically look at last modification date or store a signature of the AAE but this isn't currently stored. I think the best option is the following:
@all-contributors please add @odedia for bug
@RhetTbull
I've put up a pull request to add @odedia! :tada:
Actually, I can make this work with the normal --update
logic as the export database stores a record associated with each exported file, thus I can store the signature of the AAE and update status in database without any modification to the database schema.
I have this partially implemented:
osxphotos export ~/Desktop/export --verbose --export-aae --update --selected
Exporting 1 photo to /Users/rhet/Desktop/export...
Exporting wedding.jpg (E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51.jpeg) (1/1)
Skipping up to date AAE file /Users/rhet/Desktop/export/wedding.AAE
Skipped up to date file /Users/rhet/Desktop/export/wedding.jpg
Exporting edited version of wedding.jpg (E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51.jpeg)
Skipped up to date file /Users/rhet/Desktop/export/wedding_edited.jpeg
Exporting 1 photos ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Processed: 1 photo, exported: 0, updated: 0, skipped: 2, updated EXIF data: 0, missing: 0, error: 0
Elapsed time: 0:00:00
Cleaning up lock files
Fix in main and will be included in next release
Thank you!
By the way, this change also adds new aae_written
and aae_skipped
fields to the export report.
How funny, I just spotted the same bug and when checking the sourcecode on GitHub I saw that it was already fixed! Cool & looking forward to the next release with the fix!
@finestream I'm close to a new release -- have been focused on a complete rewrite of the osxphotos import
code that allows the import command to recreate a library from an export. This should be very useful in many use cases but it has required extensive work and testing. I think I'm close!
It seems like exporting AAE files alongside the JPEGs send an error message on a second run with
--update
as if it wasn't supposed to be there. The sample error below happens for every edited file with an .AAE on the second run:It's possible osxphotos cannot identify that it's updating the existing AAE. The errors go away when you disable
export_aae
in the toml file.