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

Give back changes from pyicloud_ipd fork #367

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

Conversation

menkej
Copy link

@menkej menkej commented Feb 6, 2022

I'm currently somehow maintaining "icloud photos downloader", icloudpd. That project relies on an old fork of pyicloud (pyicloud_ipd) by the program creator who added some slight changes/improvements to the behavior of pyicloud. IMHO these changes should have gone to pyicloud directly in the first place. This is my try to remove the necessity of the fork and port icloudphotosdownloader back to upstream version of pyicloud. I'm not the icloud or python expert, so please be merciful and help me putting this together.

Maybe it would make sense to put this in separate pull requests, but overall the changes are not soooo big, I think

Summary of the changes (as far as I can reconstruct):

  1. Additional key checking for photo version build-up, so if some keys are not set (correctly) they're set with None
  2. (update after solving merge conflicts: already in pyicloud) Fix 'ValueError: year is out of range' when year is set to 0000. Just set the time to the earliest valid time (in 1970)
  3. Improve photo/movie detection and add item_type property that returns either "image" or "movie" - new key/feature. Should not break anything.
  4. Fix crash for unknown itemType. Fall back to checking the filename extension, then default to 'movie'.
  5. Allow client_id to be overridden in init (for replayable HTTP requests in pyvcr tests)
  6. We've not only seen '----Root-Folder----', but also '----Project-Root-Folder----' - bugfix

Breaking change

It could be that changes 1 and 4 could break the use of this lib, but I'm not sure about that.

Proposed change

See above.

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

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

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.

5 participants