Reintroduce immich permissions fix for shared albums#614
Reintroduce immich permissions fix for shared albums#614dimiandre wants to merge 1 commit intofatihak:mainfrom
Conversation
|
@dimiandre I was having OOM issues with full size immich images, I took the opportunity to include your code if it is fine to you :) I had to add the |
thanks! i'll try your implementation too. I'm having your same problem, usually goes oom after 5-6 days of running |
|
@dimiandre exactly, after a few days too! |
|
Interested in this as I am facing similar issues :) |
What happened
#469 (Fix Immich permissions issue for shared albums) correctly fixed shared albums by fetching assets via
GET /api/albums/{id}and using the responseassetsarray, so all album members’ photos were included.In #427 (Image memory optimization), the plugin was refactored (new image loader,
get_album_id+get_assets, etc.). During that refactor, asset listing was switched back toPOST /api/search/metadatawithalbumIds, and the #469 behavior was effectively reverted. So the fix was already there; it was removed by mistake.Resulting bug
For shared albums, the plugin once again only sees assets owned by the API key user. The UI shows the full album (e.g. 33 photos), but the plugin only receives a subset (e.g. 5). As a result, “random” selection is limited and the same photos repeat.
I believe this is a very common scenario. For example, I created the album using my account and uploaded some photos, but the majority were uploaded by my girlfriend with a different account.
This PR
Restores the #469 approach for listing assets: use
GET /api/albums/{albumId}andalbum.get("assets", [])again. All of #427’s improvements are kept (streaming, resize, image loader) only the source of the asset list is reverted to the endpoint that returns the full album, including shared contributors. No change to how images are loaded, so the OOM fix from #427 should remain in place.