API Script Examples #7735
Replies: 4 comments 14 replies
-
How long is the script? Could it be posted as a guide? |
Beta Was this translation helpful? Give feedback.
-
I'm trying to learn some of this, can you point me to some examples or a place to start? |
Beta Was this translation helpful? Give feedback.
-
Hi - This script looks like exactly what I need. I am trying to move over from Google to Immich and this is stopping me. I use an RClone mount to connect to Google Photos and download a shared album that my family add photos too regularly. Then I keep that downloaded folder added to my photo frame and it monitors for new photos. I was trying to figure out if it's possible to Rclone mount in the same way as Google Photos, but can't seem to find a way. So this script would be perfect. Unfortunately, I am getting a 404 when I try to connect to the link - Is the script still available by any chance? Thanks |
Beta Was this translation helpful? Give feedback.
-
@PureLoneWolf @LuucE Sorry for the delay. I have updated the script to allow for multiple albums or even all photos on a server. There are no breaking changes so you can pull the new script from https://git.orenit.solutions/open/immichalbumpull without updating your config. If you want to download multiple albums the album config entry now accepts a comma seperated list of album names. If you leave the album config entry blank it will attempt to download all the images from the server. I've tested as much as I can. I use my server with a single shared user for both my wife and I so I haven't tested whether it works with shared items. I have assumed, but not tested, that the "all images" option will download all images that the API key has access to whether they are owned by the user or shared. I have also added some helpful (maybe) console output so you can view the status of the script, how many photos it has found, whether it is downloading or processing a raw file etc. to run the script in cron with only error output I use 'chronic' to silence the script. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I relatively recently switched to immich from photoprism. I have a custom made digital photo frame running from a raspberry pi and previously manually added photos to a nextcloud folder and used rclone to sync this folder to the pi to update photos.
After moving to immich I wanted to make use of the api to have a "Photoframe" album in immich and have the photos pulled. This would make the process feasible for my wife to manage the photoframe contents with no input from me and without the manual process of populating the nextcloud folder.
I have some basic coding knowledge but most of my experience is from 10 years ago so I was hoping to find some easily adaptable api examples to be able to cobble things together. In the end I couldn't find anything very helpful and nothing immich specific outside of the api documentation.
I've managed to cobble something together in python that works for me, I tried to keep it simple and efficient and easily sharable. With an api key in a file alongside the script, the instance url, album name and destination folder it will download and delete photos from the destination folder only when there are changes.
I wanted to share the script so wondered if there is already a store of these kinds of example scripts for users to take and adapt that I could contribute to? If not what would be the prefered way of sharing this sort of thing?
Some possible options:
Beta Was this translation helpful? Give feedback.
All reactions