Closed oPromessa closed 3 months ago
This is by design. UUIDs only apply to a specific library on a specific Mac. (And if you use Photos library repair tool, UUIDs may change). Because of this, UUIDs cannot be used to compare assets between libraries. osxphotos sync
uses a signature (see photo_signature.py) which in most cases, is the case-normalized filename + the fingerprint (a type of file hash used internally by Photos) to match photos. This is fairly reliable but in the case of true duplicates, will result in multiple matches.
In order to maximize the preservation of metadata during sync, if OSXPhotos finds duplicates during export, the metadata is merged:
During import, any photo matching a signature of a photo in the metadata db gets the metadata applied:
Given two identical photos with the same name, there is no possible way OSXPhotos could know what the user's intent was when doing a sync so the code maximizes preservation of data.
osxphotos import
faces the same issue when looking for duplicates. In this case, #1374 added --signature
option which allows the user to specify a custom signature template to be used for duplicate compare. The primary reason for this is the photo_signature()
method used in sync compares filenames as part of the signature but when importing there may be duplicates with different filenames and the user would want to find those. Thus you can specify just the fingerprint or some other combination of metadata. I could add this same option to osxphotos sync
but it would not resolve this issue and I'm not sure it's as useful in the context of sync because the user likely thinks of a matching photo for sync purposes as one that has the same name and is binary equivalent, not just "any possible duplicate".
Before submitting a bug report, please ensure you are running the most recent version of osxphotos and that the bug is reproducible on the latest version
Yes. In this case using a development branch of 0.68.4. But the official 0.68.4 should have the same behaviour.
Describe the bug Sync impacts any pics with same fingerprint, even though they may have different UUIDs. The pics may have been generated via Duplicate and then Edited in Mac Photos.
To Reproduce Steps to reproduce the behavior:
osxphotos sync --export test.db
osxphotos sync --import test.db --set title,description,favorite,albums,location --merge keywords --verbose --verbose --timestamp --report import.sync.json
Expected behavior Don't know what else osxphotos could do, or if it even should act any differently as across Libraries and beyond the Fingerprint there isn't additional information osxphotos could work with to math/differentiate pics in this situation.
Screenshots N/A
Desktop (please complete the following information):
Additional context Building into sync the location field.