pyicloud icon indicating copy to clipboard operation
pyicloud copied to clipboard

Add Support for Live Photos - Interface Design Question

Open bexelbie opened this issue 6 years ago • 7 comments

Part of fixing this is to redo the way that images are detected. Right now LivePhotos are misdetected as movies for versions other than "original"

bexelbie avatar Apr 15 '18 14:04 bexelbie

What should the interface for exposing the image and video look like for live photos?

I am wondering if we need a second download function? what?

bexelbie avatar Apr 15 '18 21:04 bexelbie

Thinking about this, I believe that we should add a second item_type that identifies the item more specifically, i.e. burst, panorama, live photo, timelapse, etc. This provides data to the consumer of the module.

For the download, we should add new versions for live photos, such as original-live, medium-live, thumb-live that provide the video. It will be up to consumers to "do the right thing" with regards to naming.

This potentially opens up a way to handle bursts, if someone wishes to look into those.

WDYT?

bexelbie avatar Apr 16 '18 14:04 bexelbie

also, I think we should expose edited photos as well via edit-size-type. What do you think?

bexelbie avatar Apr 22 '18 19:04 bexelbie

@bexelbie live photos have been solved in https://github.com/ndbroadbent/pyicloud/tree/pyicloud-ipd (a fork of this repo to support https://github.com/ndbroadbent/icloud_photos_downloader). See this commit specifically: https://github.com/ndbroadbent/pyicloud/commit/4223f4b88f2434d3326efea22e3189a4712a644b

Regarding edited photos, I've been trying to get those by changing the u"original": u"resOriginal" value in https://github.com/picklepete/pyicloud/blob/master/pyicloud/services/photos.py#L424 to many different keys from https://github.com/picklepete/pyicloud/blob/master/pyicloud/services/photos.py#L349, but it doesn't seem to work. You mention edit-size-type — what is that? If you point me in the right direction I'll try to implement this.

pedroms avatar Nov 20 '18 09:11 pedroms

@pedroms I honestly don't remember at this moment - I have some travel coming up and will try to see if I can remember what I was doing when I found it over the 4th quarter holidays -- sorry for nothing more now

bexelbie avatar Nov 25 '18 13:11 bexelbie

@pedroms I did find a note that I thought I could detect edited photos because they have the "adjustmentType" key. A simple metadata dumper I wrote from the icloud_photos_downloader codebase seems to bear this out.

bexelbie avatar Nov 25 '18 13:11 bexelbie

@bexelbie live photos have been solved in https://github.com/ndbroadbent/pyicloud/tree/pyicloud-ipd (a fork of this repo to support https://github.com/ndbroadbent/icloud_photos_downloader). See this commit specifically: icloud-photos-downloader@4223f4b

Regarding edited photos, I've been trying to get those by changing the u"original": u"resOriginal" value in https://github.com/picklepete/pyicloud/blob/master/pyicloud/services/photos.py#L424 to many different keys from https://github.com/picklepete/pyicloud/blob/master/pyicloud/services/photos.py#L349, but it doesn't seem to work. You mention edit-size-type — what is that? If you point me in the right direction I'll try to implement this.

Do you find any hint to use burstId field of CPLAsset? I cannot find the showing-burst operation in icloud.com so I cannot find the Web Request.

landall avatar Jun 30 '23 07:06 landall