mandarons / icloud-drive-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
985 stars 47 forks source link

[FEATURE] Downloads photos while maintaining photo albums #99

Closed tymmej closed 1 year ago

tymmej commented 1 year ago

Use case I want to backup all photos but also preserve albums structure.

Describe the solution you'd like When not providing filter and providing extra flag docker should backup photos not to all folder but according to album structure. It would be nice if docker would support nested albums as nested folders. Otherwise it can create flat folder structure replacing / with -, eg. Folder-Subfolder/[photos inside] instead of Folder/Subfolder/[photos inside].

Describe alternatives you've considered I do not see any :(

Additional context Photo albums are available as filters so it should be doable. Maybe if providing filter as * it should copy all?

eg.

if filters["albums"]:
    if filters["albums"] == ["*"]:
        for album in photos.albums:
            sync_album(
                album=photos.albums[album],
                destination_path=os.path.join(destination_path, album),
                file_sizes=filters["file_sizes"],
            )
    else:
       old code path