immich-auto-stack
immich-auto-stack copied to clipboard
feat/v1.114.0 immich support
As this is not being merged, I created my own version of immich-stack, which can be found here: https://github.com/Majorfi/immich-stack
While keeping the same general flow, this come with improvements and some changes, but should work just fine! Code available via executable, via go build or via docker package!
Enjoy!
Linked to https://github.com/tenekev/immich-auto-stack/issues/10 and https://github.com/tenekev/immich-auto-stack/issues/11
I ran into the same issue and gave it a shot. I am no python expert, so tried to make it work with the new
stackendpoint as I could and tested it on my library (10k photos) with success.Happy to answer any questions! Thank you Edit: You can run it with this for example:
API_URL="YOUR_IMMICH_API_URL" API_KEY="YOUR_ACCOUNT_API_KEY" SKIP_PREVIOUS=True PARENT_PROMOTE="edit,crop,hdr" python immich_auto_stack.py
Hey there and thanks for your input. Unfortunately it's very unlikely to merge all of this because I've already started work on an update. Recent discussions made me reconsider the scrip functionality as a whole and in order to implement them, I needed to rewrite and reorder most of it. It's not just a stacks update anymore. Hence the delay, among other reasons.
I looked through the changes and I'll take whatever I can.
Just want to thank you, @Majorfi – I'm on holiday shooting and uploading daily and your commit worked a charm as a temporary fix to keep my timeline more organized while @tenekev works on their rewrite. Appreciate it and appreciate this script 🙌.
@Majorfi I tested it as well, and its working well for me. Thanks!
Thank you for your work @Majorfi! This is a great patch while @tenekev works on a re-write.
Here are the steps for folks who haven't built a docker image locally. If anyone has a different way let me know, but this worked for me.
How to:
I did this in a subfolder of my main immich directory (immich-app)
- clone the github repo
cd immich-app(or whatever yours is called)git clone https://github.com/Majorfi/immich-auto-stack.gitcd immich-auto-stackgit checkout patch-1
- build it locally:
docker build -t immich-auto-stack:patch-1 .
- Edit compose:
- in docker-compose for immich-auto-stack, change:
image: ghcr.io/tenekev/immich-auto-stack:latest- to
image: immich-auto-stack:patch-1- This references the image you've built locally instead of a remote image
- Restart the docker container
docker compose up -d
My compose file:
immich-auto-stack:
container_name: immich-auto-stack
image: immich-auto-stack:patch-1 #temp replacement while the original dev updates it for recent immich support #ghcr.io/tenekev/immich-auto-stack:latest
restart: unless-stopped
....rest of docker-compose.yml
Alternatively (for simplicity's sake), you could download @Majorfi's immich_auto_stack.py file and just run that through a terminal command (or on a schedule) in your existing docker container (personally, I mapped a new "temporary" directory and am running this script manually in the interim when needed).
You don't have to manually check it out, you can just do the following change in your compose:
immich-auto-stack:
container_name: immich-auto-stack
#image: ghcr.io/tenekev/immich-auto-stack:latest
build: https://github.com/Majorfi/immich-auto-stack.git#d039ac39346c2fc758799636e3ca5ffff878d18e
...
(I refer the commit to be on the safe side, but you could also use #patch-1 in the url)
and then run docker compose build immich-auto-stack instead of docker compose pull immich-auto-stack before starting the container with docker compose up immich-auto-stack
Thank you @chkuendig. Its working like a charm.
@tenekev seems the rewrite is taking some time and this is a working fix. Could you reconsider accepting this PR to make your solution work again? :)
This seems to break stuff like "motion photos". Instead of creating a stack of the raw + the jpeg (which is a "motion photo") it also includes the underlying mp4 in the stack which is normally not visible in immich. (Only via the play motion photo button)
This seems to break stuff like "motion photos". Instead of creating a stack of the raw + the jpeg (which is a "motion photo") it also includes the underlying mp4 in the stack which is normally not visible in immich. (Only via the play motion photo button)
@belst Seems like searchAssets api includes encoded motion video in the search result. I did not find a way to exclude them from the result though.
edit: add "isVisible": True to payload when fetching assets solved the problem.
def fetchAssets(self, size: int = 1000) -> list:
payload = {
"size": size,
"page": 1,
# 'withExif': True,
"withStacked": True,
+ "isVisible": True,
}
Thanks for the fix. But when I launch a search, by tags or others, the stacks disappear. Can this be changed?
@keisersuze I don't think it's implemented in immich yet. See https://github.com/immich-app/immich/discussions/6387
Just a general note: I’ve expanded this tool to better fit my needs and skill set, making it easier to build on top of. I’m working on a Go version, available here: https://github.com/Majorfi/immich-stack. It mimics the features of immich-auto-stack — not a full 1:1 port, but it’s been working great with my 13k photo library!
And docker available 🎊