Dates not refreshing when rescanning files #1567

Closed
opened 2026-02-05 02:23:16 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @DevGoran on GitHub (Nov 6, 2023).

Originally assigned to: @etnoy on GitHub.

The bug

Some files in my external library had wrong metadata, wrong dates. After adjusting those dates and refreshing metadata, rescanning all files and force-rescanning the whole library, the items are still in the wrong place in the timeline (usually a day). Items I noticed with this issue are .mp4 files.

The OS that Immich Server is running on

Ubuntu 22.04, Docker

Version of Immich Server

v1.84.0

Version of Immich Mobile App

v1.84.0

Platform with the issue

  • Server
  • Web
  • 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
      - /etc/localtime:/etc/localtime:ro
      - /mnt/cameraLibrary:/mnt/cameraLibrary
      - /mnt/casualLibrary:/mnt/casualLibrary
      - /mnt/phoneLibrary:/mnt/phoneLibrary
    env_file:
      - stack.env
    depends_on:
      - redis
      - database
      - typesense
    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
      - /etc/localtime:/etc/localtime:ro
      - /mnt/cameraLibrary:/mnt/cameraLibrary
      - /mnt/casualLibrary:/mnt/casualLibrary
      - /mnt/phoneLibrary:/mnt/phoneLibrary
    env_file:
      - stack.env
    depends_on:
      - redis
      - database
      - typesense
    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:
      - stack.env
    restart: always

  immich-web:
    container_name: immich_web
    image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release}
    env_file:
      - stack.env
    restart: always

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
      # remove this to get debug messages
      - GLOG_minloglevel=1
    volumes:
      - tsdata:/data
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
    restart: always

  database:
    container_name: immich_postgres
    image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441
    env_file:
      - stack.env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

  immich-proxy:
    container_name: immich_proxy
    image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release}
    environment:
      # Make sure these values get passed through from the env file
      - IMMICH_SERVER_URL
      - IMMICH_WEB_URL
    ports:
      - 2283:8080
    depends_on:
      - immich-server
      - immich-web
    restart: always

  backup:
    container_name: immich_db_dumper
    image: prodrigestivill/postgres-backup-local
    env_file:
      - stack.env
    environment:
      POSTGRES_HOST: database
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      SCHEDULE: "@daily"
      BACKUP_NUM_KEEP: 7
      BACKUP_DIR: /db_dumps
    volumes:
      - ./db_dumps:/db_dumps
    depends_on:
      - database

volumes:
  pgdata:
  model-cache:
  tsdata:

Your .env content

UPLOAD_LOCATION=/mnt/Immich
IMMICH_VERSION=release
TYPESENSE_API_KEY=random
DB_PASSWORD=postgrespass
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgresuser
DB_DATABASE_NAME=immich
REDIS_HOSTNAME=immich_redis
TZ=Europe/Berlin

Reproduction steps

1.Upload file
2.Adjust metadata
3.Refresh / Rescan Library
4.Clear browser cache

Additional information

https://imgur.com/a/JbrSIOq

Originally created by @DevGoran on GitHub (Nov 6, 2023). Originally assigned to: @etnoy on GitHub. ### The bug Some files in my external library had wrong metadata, wrong dates. After adjusting those dates and refreshing metadata, rescanning all files and force-rescanning the whole library, the items are still in the wrong place in the timeline (usually a day). Items I noticed with this issue are .mp4 files. ### The OS that Immich Server is running on Ubuntu 22.04, Docker ### Version of Immich Server v1.84.0 ### Version of Immich Mobile App v1.84.0 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML 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 - /etc/localtime:/etc/localtime:ro - /mnt/cameraLibrary:/mnt/cameraLibrary - /mnt/casualLibrary:/mnt/casualLibrary - /mnt/phoneLibrary:/mnt/phoneLibrary env_file: - stack.env depends_on: - redis - database - typesense 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 - /etc/localtime:/etc/localtime:ro - /mnt/cameraLibrary:/mnt/cameraLibrary - /mnt/casualLibrary:/mnt/casualLibrary - /mnt/phoneLibrary:/mnt/phoneLibrary env_file: - stack.env depends_on: - redis - database - typesense 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: - stack.env restart: always immich-web: container_name: immich_web image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release} env_file: - stack.env restart: always typesense: container_name: immich_typesense image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd environment: - TYPESENSE_API_KEY=${TYPESENSE_API_KEY} - TYPESENSE_DATA_DIR=/data # remove this to get debug messages - GLOG_minloglevel=1 volumes: - tsdata:/data restart: always redis: container_name: immich_redis image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3 restart: always database: container_name: immich_postgres image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441 env_file: - stack.env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - pgdata:/var/lib/postgresql/data restart: always immich-proxy: container_name: immich_proxy image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release} environment: # Make sure these values get passed through from the env file - IMMICH_SERVER_URL - IMMICH_WEB_URL ports: - 2283:8080 depends_on: - immich-server - immich-web restart: always backup: container_name: immich_db_dumper image: prodrigestivill/postgres-backup-local env_file: - stack.env environment: POSTGRES_HOST: database POSTGRES_DB: ${DB_DATABASE_NAME} POSTGRES_USER: ${DB_USERNAME} POSTGRES_PASSWORD: ${DB_PASSWORD} SCHEDULE: "@daily" BACKUP_NUM_KEEP: 7 BACKUP_DIR: /db_dumps volumes: - ./db_dumps:/db_dumps depends_on: - database volumes: pgdata: model-cache: tsdata: ``` ### Your .env content ```Shell UPLOAD_LOCATION=/mnt/Immich IMMICH_VERSION=release TYPESENSE_API_KEY=random DB_PASSWORD=postgrespass DB_HOSTNAME=immich_postgres DB_USERNAME=postgresuser DB_DATABASE_NAME=immich REDIS_HOSTNAME=immich_redis TZ=Europe/Berlin ``` ### Reproduction steps ```bash 1.Upload file 2.Adjust metadata 3.Refresh / Rescan Library 4.Clear browser cache ``` ### Additional information https://imgur.com/a/JbrSIOq
Author
Owner

@etnoy commented on GitHub (Nov 9, 2023):

Did you see the caution about refreshing and caching in the library docs? https://immich.app/docs/features/libraries#external-libraries

@etnoy commented on GitHub (Nov 9, 2023): Did you see the caution about refreshing and caching in the library docs? https://immich.app/docs/features/libraries#external-libraries
Author
Owner

@DevGoran commented on GitHub (Nov 9, 2023):

Yes I did, but the same issue appears on the mobile app for me. I also tried to clear the cache there. Is there something I can provide or check whether the issue is on my side or my Immich instance?

@DevGoran commented on GitHub (Nov 9, 2023): Yes I did, but the same issue appears on the mobile app for me. I also tried to clear the cache there. Is there something I can provide or check whether the issue is on my side or my Immich instance?
Author
Owner

@etnoy commented on GitHub (Nov 9, 2023):

Does this apply only to mp4 files, and not photos? How do you change the time of the mp4 files?

@etnoy commented on GitHub (Nov 9, 2023): Does this apply only to mp4 files, and not photos? How do you change the time of the mp4 files?
Author
Owner

@DevGoran commented on GitHub (Nov 9, 2023):

So far it seems that pictures are fine, after adjusting the metadata. First I check if pictures and gifs have a value in "Date taken" in the Windows properties pane. If not, I add it. For videos I check if there is a value for "Media created". Then, I use Attribute Changer 11 to modify created, modified and accessed dates.

Edit: interesting, I just noticed it is different for web view and the app. Even after clearing the cache in Brave and trying it out with Firefox (not used with immich before), the issue persists. In the app however, some photos and videos are correctly in the timeline and others aren't.. is perhaps there an issue with my particular database?

@DevGoran commented on GitHub (Nov 9, 2023): So far it seems that pictures are fine, after adjusting the metadata. First I check if pictures and gifs have a value in "Date taken" in the Windows properties pane. If not, I add it. For videos I check if there is a value for "Media created". Then, I use Attribute Changer 11 to modify created, modified and accessed dates. Edit: interesting, I just noticed it is different for web view and the app. Even after clearing the cache in Brave and trying it out with Firefox (not used with immich before), the issue persists. In the app however, some photos and videos are correctly in the timeline and others aren't.. is perhaps there an issue with my particular database?
Author
Owner

@etnoy commented on GitHub (Feb 7, 2024):

It is a known issue that data is aggressively cached. See the documentation where you can see that it is known, and there are also instructions for how to refresh your browser cache when a file is changed externally, it's harder than you think.

I'l close this issue for now, we have it on our todo list though

@etnoy commented on GitHub (Feb 7, 2024): It is a known issue that data is aggressively cached. See the documentation where you can see that it is known, and there are also instructions for how to refresh your browser cache when a file is changed externally, it's harder than you think. I'l close this issue for now, we have it on our todo list though
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1567