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

Sync from shared libraries #489

Closed
wants to merge 2 commits into from

Conversation

pneff
Copy link

@pneff pneff commented Nov 2, 2022

Using the --list-libraries and --library options it is now possible to synchronize media from shared libraries.

This also requires icloud-photos-downloader/pyicloud#8.

pneff added 2 commits November 1, 2022 22:56
Can download photos from the shared library. Does not yet handle
deletions or moves between personal and shared library.
@lloydw
Copy link

lloydw commented Nov 21, 2022

This is great thanks @pneff !

Looking forward to it being merged into the main release, for now I've taken your branch and hacked together a working docker image.

@ianmagnone
Copy link

@lloydw Is that a docker image you'd be willing to share so I can start an initial backup of my shared library?

@lloydw
Copy link

lloydw commented Nov 22, 2022

@ianmagnone it looks like @boredazfcuk has a working image here: https://hub.docker.com/r/boredazfcuk/icloudpd

@jcbshw
Copy link

jcbshw commented Nov 30, 2022

Using this via @boredazfcuk docker container results in ZONE_NOT_FOUND when trying to list libraries. No issue with the version without Shared Library support.

Traceback (most recent call last):
  File "/usr/bin/icloudpd", line 33, in <module>
    sys.exit(load_entry_point('icloudpd==1.7.2', 'console_scripts', 'icloudpd')())
  File "/usr/lib/python3.10/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/icloudpd-1.7.2-py3.10.egg/icloudpd/base.py", line 293, in main
    libraries_dict = icloud.photos.libraries
  File "/usr/lib/python3.10/site-packages/pyicloud_ipd/services/photos.py", line 275, in libraries
    libraries[zone_name] = PhotoLibrary(
  File "/usr/lib/python3.10/site-packages/pyicloud_ipd/services/photos.py", line 154, in __init__
    request = self.service.session.post(
  File "/usr/lib/python3.10/site-packages/requests/sessions.py", line 635, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
  File "/usr/lib/python3.10/site-packages/pyicloud_ipd/base.py", line 100, in request
    self._raise_error(code, reason)
  File "/usr/lib/python3.10/site-packages/pyicloud_ipd/base.py", line 114, in _raise_error
    raise(api_error)
pyicloud_ipd.exceptions.PyiCloudServiceNotActivatedErrror: Please log into https://icloud.com/ to manually finish setting up your iCloud service (ZONE_NOT_FOUND)

@lloydw
Copy link

lloydw commented Dec 1, 2022

Hey @jcbshw, looks like you need the web api activated on your account. Simply login to iCloud.com and it should activate within a few minutes. See https://github.com/icloud-photos-downloader/icloud_photos_downloader#error-on-first-run

@jcbshw
Copy link

jcbshw commented Dec 1, 2022

Hey @jcbshw, looks like you need the web api activated on your account. Simply login to iCloud.com and it should activate within a few minutes. See https://github.com/icloud-photos-downloader/icloud_photos_downloader#error-on-first-run

Thanks but I don't think that's it. I can use iCloudPD without this patch with no issues. I have also logged into iCloud.com multiple times in the past few months and as recently as yesterday.

@timrettop
Copy link

I'm testing this feature and checked out your branches for icloud_photos_downloader and pyicloud and pip installed the local versions and am trying to get a list of my iOS 16 shared libraries but I get this error:
AttributeError: 'PhotosService' object has no attribute 'libraries'

I can see in .local/lib/python-3.10/site-packages/pyicloud/services/photos.py that the PhotosService shows a libraries attribute, anything I'm doing wrong here?

@robinryf
Copy link

robinryf commented Jan 4, 2023

I'm testing this feature and checked out your branches for icloud_photos_downloader and pyicloud and pip installed the local versions and am trying to get a list of my iOS 16 shared libraries but I get this error: AttributeError: 'PhotosService' object has no attribute 'libraries'

I can see in .local/lib/python-3.10/site-packages/pyicloud/services/photos.py that the PhotosService shows a libraries attribute, anything I'm doing wrong here?

This is because the actual fix is inside the dependency library "pyicloud". First this PullRequest ( icloud-photos-downloader/pyicloud#8 ) must be merged and then we can update the dependency.

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.

7 participants