-
Notifications
You must be signed in to change notification settings - Fork 588
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
Minor xmp fixes #1009
Minor xmp fixes #1009
Conversation
For |
src/icloudpd/base.py
Outdated
@@ -970,7 +970,7 @@ def download_photo_(counter: Counter, photo: PhotoAsset) -> bool: | |||
download.set_utime(download_path, created_date) | |||
logger.info("Downloaded %s", truncated_path) | |||
|
|||
if xmp_sidecar: | |||
if xmp_sidecar and download_size != AssetVersionSize.ADJUSTED: |
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.
How many XMP files we need for one asset downloaded in multiple sizes, e.g. original+alternative or original+live? For requested adjusted
version we download original if adjusted does not exist yet (and there is complex logic for size fallback) - may be we need digging deeper into this ares? WDYT?
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.
Yeah, it might make sense to think this through better. Maybe only download the xmp for original? Generally since the XMP is based on the asset record, it should only be created once for a specific foto.
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.
If only one xmp per asset, then we need some mechanism to ensure it is indeed once for any number of sizes fetched for asset.
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.
I removed this change. It's not critical compared to the crash when processing screenshots.
Unfortunately for all fields ending in
The Plist is easy to detect (it has specific header bytes), the other two can only be detected by decoding it (and in theory you could probably have a zlib compressed JSON where all bytes are valid unicode?). |
8f6cd8e
to
426241a
Compare
@AndreyNikiforov I removed the limitation on the |
Great! Add notes to changelog, pls, so it is clear what is new for the next release |
I added a changelog entry. Also noticed somebody else running into presumably the same issue (#1056) |
PS: Please hold, I found one more bug. |
… a crdt in the 'adjustmentSimpleDataEnc' field
@chkuendig can you pls add test(s). Sorry, I should have mentioned that sooner. |
@chkuendig are you okay with PR or you have something else to finish? If all good, change PR "draft" status to normal - I cannot merge drafts. |
I added tests but forgot to push. All good now, I also retested it on my library without issues. |
337ea77
into
icloud-photos-downloader:master
Don't write xmp sidecar for adjusted versions (some metadata like orientation only makes sense when applying to l the original file)