[BUG] Encoded videos are not removed when original asset is deleted #348

Closed
opened 2026-02-04 19:55:21 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @raisinbear on GitHub (Oct 7, 2022).

Hi,

first of all, thank you so much for creating and maintaining this great project! :)
I just set it up for the first time and found a couple of small issues, one of them being this:

Describe the bug
When an image is removed, say [data]/[library-id]/originals/[device-id]/781a4931-0df3-4439-accb-e37f74ac63af.heic, the two identically named files (up to file extension) in [data]/[library-id]/thumb/[device-id]/ are also removed. When a video is removed, the respective file in [data]/[library-id]/encoded-video/ remains. On a side-note, the file name of this encoded file also differs from the original.

Task List

Please complete the task list below. We need this information to help us reproduce the bug or point out problems in your setup. You are not providing enough info may delay our effort to help you.

  • [ x ] I have read thoroughly the README setup and installation instructions.
  • [ x ] I have included my docker-compose file.
  • [ x ] I have included my redacted .env file.
  • [ x ] I have included information on my machine, and environment.

docker-compose.yml.txt
env.txt

To Reproduce
Steps to reproduce the behavior:

  1. Upload video via app, web or cli
  2. Identify uploaded original video and transcoded preview video files in file system on server
  3. Delete video via app, web or cli
  4. Check for original video and transcoded preview video files in filesystem on server
  5. Observe original video file is removed whereas encoded video file remains

Expected behavior
When original video is removed, transcoded video should be removed, too.

Screenshots

System

  • Phone OS [iOS, Android]: iOS 16.0.2
  • Server Version: 1.31.0, arm/v7
  • Server OS: raspbian buster
  • Mobile App Version: 1.31.0 build.64

Additional context

Originally created by @raisinbear on GitHub (Oct 7, 2022). Hi, first of all, thank you so much for creating and maintaining this great project! :) I just set it up for the first time and found a couple of small issues, one of them being this: **Describe the bug** When an image is removed, say `[data]/[library-id]/originals/[device-id]/781a4931-0df3-4439-accb-e37f74ac63af.heic`, the two identically named files (up to file extension) in `[data]/[library-id]/thumb/[device-id]/` are also removed. When a video is removed, the respective file in `[data]/[library-id]/encoded-video/` remains. On a side-note, the file name of this encoded file also differs from the original. **Task List** *Please complete the task list below. We need this information to help us reproduce the bug or point out problems in your setup. You are not providing enough info may delay our effort to help you.* - [ x ] I have read thoroughly the README setup and installation instructions. - [ x ] I have included my `docker-compose` file. - [ x ] I have included my redacted `.env` file. - [ x ] I have included information on my machine, and environment. [docker-compose.yml.txt](https://github.com/immich-app/immich/files/9732044/docker-compose.yml.txt) [env.txt](https://github.com/immich-app/immich/files/9732051/env.txt) **To Reproduce** Steps to reproduce the behavior: 1. Upload video via app, web or cli 2. Identify uploaded original video and transcoded preview video files in file system on server 3. Delete video via app, web or cli 4. Check for original video and transcoded preview video files in filesystem on server 5. Observe original video file is removed whereas encoded video file remains **Expected behavior** When original video is removed, transcoded video should be removed, too. **Screenshots** - **System** - Phone OS [iOS, Android]: `iOS 16.0.2` - Server Version: `1.31.0, arm/v7` - Server OS: raspbian buster - Mobile App Version: `1.31.0 build.64` **Additional context** -
Author
Owner

@raisinbear commented on GitHub (Oct 8, 2022):

Wow that was super quick. Thank you so much for all the work you're putting into this!

@raisinbear commented on GitHub (Oct 8, 2022): Wow that was super quick. Thank you so much for all the work you're putting into this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#348