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

List-Libraries only shows libraries for which the iCloud account is the primary owner #947

Open
SamTheGeek opened this issue Sep 4, 2024 · 11 comments
Assignees
Labels

Comments

@SamTheGeek
Copy link

Overview

When using --list-libraries to show available libraries, my list only shows PrimarySync. However, I am also a participant in (but not the owner of) a Shared Library that displays in my iCloud account. --list-libraries (and the -library command) should show both libraries.

Steps to Reproduce

  1. Accept an invitation to an iCloud Shared Photo Library owned by another account
  2. Run --list-libraries

Expected Behavior

Both the primary and shared library would be listed

Actual Behavior

Only the primary library is listed

@SamTheGeek SamTheGeek added the bug label Sep 4, 2024
@boredazfcuk
Copy link
Contributor

Only the primary library is listed

This is expected behaviour.

Apple does not provide the capability to access shared libraries that you are only a participant of, only ones that you are an owner of.

Or at least this was my understanding from when shared libraries were originally released. I guess they may have changed recently. You can check by logging into icloud.com. You can only download from albums/libraries you find in there.

@SamTheGeek
Copy link
Author

SamTheGeek commented Sep 4, 2024

You have been able to access shared libraries on the web since at least last fall. Here's what I see when logging in to iCloud.com and selecting photos. (Names of my family members are redacted but appear if you view the actual site)
Screenshot of iCloud.com

@AndreyNikiforov
Copy link
Collaborator

AndreyNikiforov commented Sep 4, 2024

Can you try to list libraries by icloudpd, pls? That should confirm if we are indeed reading them from icloud.com or not

docker run --rm -it icloudpd/icloudpd:1.23.4 icloudpd -u [email protected] -d . --list-libraries

@AndreyNikiforov
Copy link
Collaborator

Only the primary library is listed

This is expected behaviour.

Apple does not provide the capability to access shared libraries that you are only a participant of, only ones that you are an owner of.

Or at least this was my understanding from when shared libraries were originally released. I guess they may have changed recently. You can check by logging into icloud.com. You can only download from albums/libraries you find in there.

IIUC browsing (and downloading) assets from Shared library should be possible

@boredazfcuk
Copy link
Contributor

Shared libraries are created with end-to-end encryption using ADP if the library owner has it enabled for their account. Maybe this is why users cannot see the shared libraries that they are only members of... the owners have ADP enabled.

@AndreyNikiforov
Copy link
Collaborator

Shared libraries are created with end-to-end encryption using ADP if the library owner has it enabled for their account. Maybe this is why users cannot see the shared libraries that they are only members of... the owners have ADP enabled.

Did not know about e2e encryption: ADP must be turned on for all accounts though. If the person does not have ADP enabled, they should be able to use icloudpd for personal and shared folders.

@SamTheGeek
Copy link
Author

@AndreyNikiforov output of --list-libraries

2024-09-05 15:27:40 DEBUG Authenticating...
PrimarySync

The main user does not have ADP on (nor knows what that is) and I don't either.

@AndreyNikiforov
Copy link
Collaborator

@AndreyNikiforov output of --list-libraries

2024-09-05 15:27:40 DEBUG Authenticating...
PrimarySync

The main user does not have ADP on (nor knows what that is) and I don't either.

To summarize, when opening icloud.com in the browser, you can see Personal and Shared libs, while icloudpd for the same account shows only Personal (==PrimarySync, IIUC). Interesting...

@SamTheGeek
Copy link
Author

Exactly so. Fascinating indeed!

@AndreyNikiforov AndreyNikiforov self-assigned this Sep 6, 2024
@spiderpug
Copy link

I'm also in this situation and I would like to sync/download photos of the Shared Library primarily.

Is there anything I can do to help debugging or solving this?

@mitchplze
Copy link

mitchplze commented Jan 7, 2025

From the command line, I am able to list my Personal Library name, and then my wife and I's "Shared Library".
I am the 'owner' of said library, and my iCloud does all the heavy lifting.

SharedSync-EBC80CC8-EFA3-44C9-88A5-XYXYZZZZABCD
PrimarySync

(UID of the shared library is redacted/altered here)

Due to the limitation mentioned (only one library can be used by icloudpd), I simply created a new Docker stack with alternate settings, and run it in parallel with a different port, different volumes, and the command line switch.

Personal Library

services:
  icloudpd:
    stdin_open: true
    tty: true
    volumes:
      - photos:/data
      - cookies:/cookies
      - scripts:/scripts
    environment:
      - TZ=America/Vancouver
    ports:
      - 5555:8080
    image: icloudpd/icloudpd:latest

    command: >
      icloudpd 
      --directory /data 
      --cookie-directory /cookies
      --username <redacted>
      --watch-with-interval 3600 
      --password-provider webui
      --mfa-provider webui 
      --set-exif-datetime
      --auto-delete 


volumes:
  photos:
    driver: local
    driver_opts:
      type: nfs
      o: addr=10.13.5.5,nolock,soft,rw 
      device: :/volume1/homes/mitch/Photos    
  cookies:
    driver: local
    driver_opts:
      type: nfs
      o: addr=10.13.5.5,nolock,soft,rw 
      device: :/volume1/docker/icloudpd-mitch/cookies            
  scripts:
    driver: local
    driver_opts:
      type: nfs
      o: addr=10.13.5.5,nolock,soft,rw 
      device: :/volume1/docker/icloudpd-mitch/scripts  

Shared Library

services:
  icloudpd:
    stdin_open: true
    tty: true
    volumes:
      - photos:/data
      - cookies:/cookies
      - scripts:/scripts
    environment:
      - TZ=America/Vancouver
    ports:
      - 5556:8080
    image: icloudpd/icloudpd:latest

    command: >
      icloudpd 
      --directory /data 
      --cookie-directory /cookies
      --username <redacted>
      --watch-with-interval 3600 
      --password-provider webui
      --mfa-provider webui 
      --set-exif-datetime
      --auto-delete 
      --library "SharedSync-EBC80CC8-EFA3-44C9-88A5-XYXYZZZZABCD" 

volumes:
  photos:
    driver: local
    driver_opts:
      type: nfs
      o: addr=10.13.5.5,nolock,soft,rw 
      device: :/volume1/homes/mitch/Photos-Shared
  cookies:
    driver: local
    driver_opts:
      type: nfs
      o: addr=10.13.5.5,nolock,soft,rw 
      device: :/volume1/docker/icloudpd-shared/cookies            
  scripts:
    driver: local
    driver_opts:
      type: nfs
      o: addr=10.13.5.5,nolock,soft,rw 
      device: :/volume1/docker/icloudpd-shared/scripts  

This seems to be working flawlessly for me in production.

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

No branches or pull requests

5 participants