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

Document PhotosAlbum and add append() and extend() methods. #1524

Open
RhetTbull opened this issue Apr 19, 2024 · 0 comments
Open

Document PhotosAlbum and add append() and extend() methods. #1524

RhetTbull opened this issue Apr 19, 2024 · 0 comments

Comments

@RhetTbull
Copy link
Owner

This is probably worth adding to the API Docs as it's a useful feature. It's not currently because in my mind, this isn't a core osxphotos feature. With the exception of timewarp and batch-edit commands (which aren't exposed in the public API), osxphotos provides read only access to the Photos library. It is not a goal of mine to enable the API to modify the library. I've built some tools like PhotosAlbum as internal helpers to do modification where necessary but there are actually implemented using another library of mine, PhotoScript.

for p in edited_photos:
    p.albums.append('GR3 edited')

This syntax won't be supported in osxphotos because it would require a complete rewrite of the API which is predicated on the PhotoInfo object being read only.

It does however make sense to add append and extend to the PhotosAlbum code and to expose this as a public API of osxphotos. So few people use the API that focus most of my effort on the CLI which is widely used.

Originally posted by @RhetTbull in #1523 (comment)

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

No branches or pull requests

1 participant