-
Notifications
You must be signed in to change notification settings - Fork 457
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
Get Photo-Album within Folder #288
Comments
Hello there ! It's written in the doc: https://github.com/picklepete/pyicloud#photo-library Closing, tell me if the issue persists. |
Hello,
the issue still exists.
The doc explains only, how to access photos in the first level album hierarchy, i.e. ‘screenshots’. If the photos are organized with subfolders, i.e. ‘My albums’à’2020’à’Summer’ (here ‘2020’ is a folder, not an album), there is no possibility to access the album ‘Summer’.
api.photos.albums['Summer'] yields ‘not found’,
same with api.photos.albums['My Albums/2020/Summer']
Maybe there is a way to access albums within subfolders, which is not documented? Or does Pyicloud not support subfolders?
Best regards
Jörg
|
Have you tried |
Unfortunately it doesn’t work.
If I try, i.e.
print(api.photos.albums['2020']['testalbum'])
then I get TypeError: 'PhotoAlbum' object is not subscriptable.
Same error when executing:
for photo in api.photos.albums['2020']['testalbum']:
print(photo, photo.filename)
print(api.photos.albums['2020']) works and gives ‘2020’ in the console
for photo in api.photos.albums['2020']:
print(photo, photo.filename)
gives no error. (there are no photos in the folder ‘2020’)
It would be also very helpful to be able to list all folders and all albums within a folder.
regards
Jörg
Von: Quentame <[email protected]>
Gesendet: Freitag, 7. August 2020 14:16
An: picklepete/pyicloud <[email protected]>
Cc: Matthes, Jörg (IAI) <[email protected]>; Author <[email protected]>
Betreff: Re: [picklepete/pyicloud] Get Photo-Album within Folder (#288)
Have you tried api.photos.albums['My Albums']['2020']['Summer'] ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#288 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AHTBJTEUDOGVVQB4VCATW2LR7PV7DANCNFSM4PHSRDKQ> . <https://github.com/notifications/beacon/AHTBJTGF2NPUYKKIWFR62ALR7PV7DA5CNFSM4PHSRDK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE73NHZY.gif>
|
Turns out, subfolders are currently not supported in the code. https://github.com/picklepete/pyicloud/blob/master/pyicloud/services/photos.py#L176 marks it neatly as a TODO item... |
Ups, haven't checked 😅 Actually do not have iCloud Photos in my account. |
Hey, I actually just hit this today! After some snooping around at the traffic from iCloud Photos, I was able to enhance the code to distinguish between folders and albums, and then continue to traverse folders looking for more albums. The changes are over on https://github.com/noizwaves/pyicloud/tree/albums-in-folders. If you'd like, I could polish it up into a PR. |
@noizwaves Awesome work. @Quentame is on a vacation for the next days, so your change cannot be merged yet. But I think a PR would be pretty awesome. |
OK, finally found some time and landed the PR #297 |
How can I access Photo Albums, that are with ICloud-Folders? Tried 'Folder/Albumname' and 'Folder\Albumname'. Did not work.
The text was updated successfully, but these errors were encountered: