immich icon indicating copy to clipboard operation
immich copied to clipboard

Partner sharing deduplication

Open jianglai opened this issue 11 months ago • 0 comments

The bug

My partner and I use iCloud shared library show photos we took on our iPhones show up in both places. We were backing up to the same immich account and deduplication seems to work fine. e.g. if I take a photo and back up to immich, and my wife also backs up the same image, it shows up just once.

However, when we tried to use partner sharing, the same image would show up twice in the timeline (I enabled "show in timeline" for partner sharing).

I think if immich can deduplicate images uploaded to the same account, it should be able to do the same for images from different partners. This is the one last "feature mismatch" from Google Photos that I miss.

The OS that Immich Server is running on

Arch

Version of Immich Server

v1.99.0

Version of Immich Mobile App

v1.99.0

Platform with the issue

  • [X] Server
  • [ ] Web
  • [X] Mobile

Your docker-compose.yml content

version: "3.8"                                                                  
                                                                                
services:                                                                       
  immich-server:                                                                
    container_name: immich_server                                               
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}          
    command: [ "start.sh", "immich" ]                                           
    volumes:                                                                    
      - ${UPLOAD_LOCATION}:/usr/src/app/upload                                  
    env_file:                                                                   
      - .env                                                                    
    ports:                                                                      
      - 2283:3001                                                               
    depends_on:                                                                 
      - redis                                                                   
      - database                                                                
    restart: always                                                             
                                                                                
  immich-microservices:                                                         
    container_name: immich_microservices                                        
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}          
    # extends:                                                                  
    #   file: hwaccel.yml                                                       
    #   service: hwaccel                                                        
    command: [ "start.sh", "microservices" ]                                    
    volumes:                                                                    
      - ${UPLOAD_LOCATION}:/usr/src/app/upload                                  
    env_file:                                                                   
      - .env                                                                    
    depends_on:                                                                 
      - redis                                                                   
      - database                                                                
    restart: always                                                             
                                                                                
  immich-machine-learning:                                                      
    container_name: immich_machine_learning                                     
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:                                                                    
      - model-cache:/cache                                                      
    env_file:                                                                   
      - .env                                                                    
    restart: always                                                             
                                                                                
  redis:                                                                        
    container_name: immich_redis                                                
    image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
    restart: always                                                             
                                                                                
  database:                                                                     
    container_name: immich_postgres                                             
    image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    env_file:                                                                   
      - .env                                                                    
    environment:                                                                
      POSTGRES_PASSWORD: ${DB_PASSWORD}                                         
      POSTGRES_USER: ${DB_USERNAME}                                             
      POSTGRES_DB: ${DB_DATABASE_NAME}                                          
    volumes:                                                                    
      - pgdata:/var/lib/postgresql/data                                         
    restart: always                                                             
                                                                                
  backup:                                                                       
    container_name: immich_db_dumper                                            
    image: prodrigestivill/postgres-backup-local                                
    env_file:                                                                   
      - .env                                                                    
    environment:                                                                
      POSTGRES_HOST: database                                                   
      POSTGRES_DB: ${DB_DATABASE_NAME}                                          
      POSTGRES_USER: ${DB_USERNAME}                                             
      POSTGRES_PASSWORD: ${DB_PASSWORD}                                         
      SCHEDULE: "@daily"                                                        
      BACKUP_NUM_KEEP: 168                                                      
      BACKUP_DIR: /db_dumps                                                     
    volumes:                                                                    
      - /mnt/backup/archives/immich/db_dumps:/db_dumps                          
    depends_on:                                                                 
      - database                                                                
                                                                                
volumes:                                                                        
  pgdata:                                                                       
  model-cache:                                          


### Your .env content

```Shell
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
                                                                                   
# The location where your uploaded files are stored                                
UPLOAD_LOCATION=/mnt/data/Media/Photos                                          
                                                                                
# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release                                                          
                                                                                
# Connection secrets for postgres and typesense. You should change these to random passwords
TYPESENSE_API_KEY=[redacted]                                      
DB_PASSWORD=[redacted]                                            
                                                                                
# The values below this line do not need to be changed                          
###################################################################################
DB_HOSTNAME=immich_postgres                                                     
DB_USERNAME=postgres                                                            
DB_DATABASE_NAME=immich                                                         
                                                                                
REDIS_HOSTNAME=immich_redis   


### Reproduction steps

```bash
1. Enable shared library on two iPhones
2. Enable partner sharing for two immich accounts
3. Enable "show in timeline" for the partner account
4. Take a photo on one iPhone
5. Backup the photo from iPhone 1 to immich accounts 1
6. Backup the photo from iPhone 2 to immich accounts 2
7. See the same image twice in the timeline.

Additional information

No response

jianglai avatar Mar 24 '24 22:03 jianglai