Skip to content
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

Add support for downloading all available versions of photos #347

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jcass77
Copy link

@jcass77 jcass77 commented Sep 2, 2021

Breaking change

No breaking changes.

Proposed change

There appear to be more photo versions available on iCloud than pyicloud currently caters for. This PR:

  1. makes the 'full', 'large', 'sidecar', and 'original_alt' photo resources and 'original_compl' video resource available for download as well.
  2. if the user has edited a photo, then that version will be downloaded instead of the original unedited version.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New service (thank you!)
  • New feature (which adds functionality to an existing service)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests
  • Documentation or code sample

Example of code:

# There aren't any changes. The below still provides a list of the versions that are available for download.
photo.versions.keys()

# If an edited version of the photo is available on iCloud, then the below will download that version instead.
download = photo.download('original')

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

  • Documentation added/updated to README

pyicloud/services/photos.py Outdated Show resolved Hide resolved
@hirenr
Copy link

hirenr commented Nov 21, 2021

Any idea when this would merge?

@jcass77
Copy link
Author

jcass77 commented Jun 18, 2022

Rebased on the master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Downloading photos downloads version with editions undone
3 participants