mandarons / icloud-docker

Dockerized iCloud Client - make a local copy of your iCloud documents and photos, and keep it automatically up-to-date.
BSD 3-Clause "New" or "Revised" License
1.15k stars 49 forks source link

[BUG] Cannot Download specific albums when not only syncing the "PrimarySync" library #201

Closed jdierkse closed 7 months ago

jdierkse commented 7 months ago

Describe the bug I want to download only a specific album from the Shared album, but if I don't provide "PrimarySync" as library, all photo's are synced.

To Reproduce

  1. Don't provide "PrimarySync" as library and specify which albums to download.
  2. All Photos get synced

Expected behavior Only the photos from the supplied albums are synced

Screenshots

Configuration Described above

Additional context

jdierkse commented 7 months ago

Trivial fix; Addition of the following code to line 192 of src/sync_photos.py seems to solve the problem:

        elif filters["albums"]:
            for album in iter(filters["albums"]):
                sync_album(
                    album=photos.libraries[library].albums[album],
                    destination_path=os.path.join(destination_path, album),
                    file_sizes=filters["file_sizes"],
                    extensions=filters["extensions"],
                    files=files,
                    folder_format=folder_format,
                )
mandarons commented 7 months ago

Please feel free to submit a PR.