[Feature] Integrate assets and albums shared with a user in this user own timeline #3984
Replies: 6 comments 2 replies
-
I second this! I've looked a bit at the tables and came up with a "simple" SQL query that maybe would do the trick (for my test, I simply counted the assets): select count(*)
from assets
where "ownerId" = '<my-id>'
or id in (
select "assetsId"
from albums_assets_assets
join albums_shared_users_users on albums_assets_assets."albumsId" = albums_shared_users_users."albumsId"
and albums_shared_users_users."usersId" = '<my-id>'
); It's not really optimized and I'm sure someone will find a better way to do this, but I hope it's a starting point. I've looked at the code to see if I could change it myself, but I'm not good at Javascript. So I believe that this should be adapted in the "getAll" function of the src/infra/repositories/asset.repository.ts file but not 100% sure... |
Beta Was this translation helpful? Give feedback.
-
Agree, this should be an opt-in kind of thing.
I believe they should be considered yours (please see below a proposal for this).
I could perfectly understand that.
I'm sure it wouldn't be an easy task, but could we maybe extract the "ownerID" from the "assets" table? immich=# \d assets
Table "public.assets"
Column | Type | Collation | Nullable | Default
------------------+--------------------------+-----------+----------+-----------------------
id | uuid | | not null | uuid_generate_v4()
deviceAssetId | character varying | | not null |
deviceId | character varying | | not null | <--- removed ownerID
type | character varying | | not null |
...
immich=# \d assets_owners_owners <--- new table
Table "public.assets"
Column | Type | Collation | Nullable | Default
------------------+------+-----------+----------+-----------------------
assetsID | uuid | | not null |
ownersID | uuid | | not null |
Then, when displaying the timelines, the query would run on both assets and assets_owners_owners. When sharing, Immich would add lines in the assets_owners_owners with the same asset IDs as the "origin" pictures but the "target" owner. Then the pictures would have their own lives in the "target" owner pictures (favoriting, archiving, deleting but keeping the file as long as there is one entry in assets_owners_owners...). Obviously I cannot even imagine the danger of taking "ownerID" out of "assets" as I cannot properly read the code and evaluate all the implications (I wish I could submit a merge request for this if it was written in a coding language I knew). |
Beta Was this translation helpful? Give feedback.
-
This! I can't even explain how staggered I was, that when I finally got my Google takeout takeout imported and shared way-to-many albums with my SO and then realised that this wasnt an option. In Evil Companys Photos, it is possible to toggle this for each album. Eg, i want all pics of "Christmas 2022" included in my timeline, search results, facial recognition etc, but I do no want "Weekend with SOs extended family 2021" displayed. Otherwise this software is so impressive, that my arms is still cant come down ;) |
Beta Was this translation helpful? Give feedback.
-
I love this! Also an option to enable the inclusion of Partner Sharing into the own Timeline would be great! Since we became parents this year, we are taking many photos and we don't want o have a shared "baby" album and manually add those images into it. |
Beta Was this translation helpful? Give feedback.
-
I second this. Currently sharing albums with family members and they are only viewers, having such feature can make their app experience more organic |
Beta Was this translation helpful? Give feedback.
-
The feature
Is it possible to view the assets that other users shared with me as if they were part of my own timeline ?
For exemple, when we do a common event, every participant user upload its assets for this event in the shared album, and every participant would like these assets to be integrated in there own timeline, as if they were the original owners.
Platform
Beta Was this translation helpful? Give feedback.
All reactions