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

Ability to add assets to shared albums #300

Open
jgoclawski opened this issue Jun 14, 2024 · 3 comments
Open

Ability to add assets to shared albums #300

jgoclawski opened this issue Jun 14, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@jgoclawski
Copy link

Hi,

Love the tool! I'm in the process of migrating my and my wife's photos from Google Photos to Immich. We had a few shared albums in Google Photos - I was their owner and my wife would add her photos there.
So in Immich I'm trying to have the same structure - an album owned by me, shared with my wife and her photos added there.
My issue is that when import my wife's photos from Takeout, a new album is created in Immich, instead of the shared one being used.

E.g. - Immich has an album "Spain 2018" owned by User A. User B uploads assets using immich-go:

./immich-go -server http://xxx.xxx.xxx.xxx:3001 -key xxx -log-level info \
upload -album "Spain 2018" "/share/UserB/Google Photos/Spain 2018"

And a new album "Spain 2018" is created. I'd love to reuse the existing, shared album.

Looks like it's about getting Albums from Immich -> https://github.com/simulot/immich-go/blob/main/immich/albums.go#L23
Is there a chance to add shared=true to the API call? https://immich.app/docs/api/get-all-albums
Maybe it could be controlled with a flag?

@simulot simulot added the enhancement New feature or request label Jun 14, 2024
@simulot
Copy link
Owner

simulot commented Jun 14, 2024

Immich-go place photos in the album with the exact same name. If this album is shared, the photos will be shared.
If the album doesn't exist, immich-go creates it, not shared. you can share it in the application.

@jgoclawski
Copy link
Author

jgoclawski commented Jun 15, 2024

Hi, thanks for you reply. Based on my experiments, I don't think that immich-go "sees" the albums that are shared, but owned by another user.

Consider the following scenario:

"User 2" has access to 3 albums:

  • Album 2A (owned by "User 2", not shared)
  • Album 2B (owned by "User 2", shared with "User 1")
  • Album 1B (owned by "User 1", shared with "User 2")

When "User 2" uses immich-go it sees only "Album 2A" and "Album 2B". If I tell it to import assets to "Album 1B", it will not see it and create a new one with that name (owned by "User 2", not shared).

It's about how immich-go calls Immich API.

When "User 2" calls /api/albums, then 2 albums are returned: "Album 2A" and "Album 2B", so a bit like "albums owned by me".
When "User 2" calls /api/albums?shared=true, then 2 different albums are returned "Album 2B" and "Album 1B", so a bit like "only shared albums, no matter who's the owner".

Would you consider adding the shared=true flag to the API call? It's what the web Immich UI does to list albums - it calls the API twice ( /api/albums + /api/albums?shared=true ) to get all the albums.

@simulot
Copy link
Owner

simulot commented Jun 15, 2024

I'll check it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants