-
Notifications
You must be signed in to change notification settings - Fork 24
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
Support shared libraries #8
base: master
Are you sure you want to change the base?
Support shared libraries #8
Conversation
This currently returns a photo album for each shared library. This can then be used to iterate over all the photos in that library. For example: for library_name, album in api.photos.libraries.items(): print(f'Library: {library_name}') for photo in album: print(f'{photo.asset_date} {photo} {photo.filename}')
The libraries are now returned as a new object type (PhotoLibrary). That provides access to albums. This way the icloud-photos-downloader can also use the Recently Deleted special album to sync deletions. The list of non-special albums is currently returned empty for the shared libraries. This also tracks with the fact that the iCloud web app currently doesn't provide access to albums in shared libraries.
@pneff How do the proposed changes align with original pyicloud lib? There is a desire to remove the fork and go with upstream pyicloud (icloud-photos-downloader/icloud_photos_downloader#179) and I am wondering if this change may further diverge the fork if it does not match with similar changes in upstream. WDYT? |
@pneff a chance something changed in the last month or so as Apple rolled out their new icloud website? Consistently now getting errors with your patch eg.
|
Is there any plans to fix this PR and merge it? I had the same error as @mikeknoop |
With no apparent changed, shared library API calls started working again for me on May 26th. |
@property | ||
def libraries(self): | ||
if not self._libraries: | ||
url = ('%s/changes/database' % |
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 got this working again by using
url = ('%s/zones/list' %
here.
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.
independent of this, it should also work if one manually looks for the correct library name on iCloud.com when showing the photosotos and giving that to the --library parameter
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 do you find the shared library name on icloud.com? Thank you.
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.
open photos on iCloud.com and watch the network requests using developer mode.
Look for the zones/list call.
The shared library name is in the result json of this call.
Any chance this will get merged in the near future? |
I don't see reasons for merging: pyicloud library is no longer used in main icloudpd project, so merging this PR will have no affect on icloudpd (will not add shared libraries support on its own). |
I think this may be the only open PR anywhere (right now) that has a working POC for icloud shared libraries. |
This supports the new iCloud shared libraries.
Example usage: