immich-go icon indicating copy to clipboard operation
immich-go copied to clipboard

It tries to replace different photo if file name has brackets

Open nkrk opened this issue 1 year ago • 2 comments

I see this messages in log 2025-02-08 09:02:19 INF server's asset upgraded with the input file.FileName=takeout-20250110T061340Z-001:Takeout/Google Фото/Photos from 2013/FILE0003(2).MOV file.FileDate=2025-01-10 06:21:05 file.Description= file.Title=FILE0003.MOV file.FileSize=1345565230 file.ID= file.CaptureDate=2013-12-24 13:25:18 file.Trashed=false file.Archived=false file.FromPartner=false file.Favorite=false file.Stars=0 file.Latitude=0.xxxxx file.Longitude=0.xxxxx reason=An asset with the same name:"FILE0003.MOV" and date:"2013-12-24 13:25:18" but with smaller size:82.7 MB exists on the server. Replace it.

It is 2 totally different files and sizes but Immich-go replaced file An asset with the same name:"FILE0003.MOV" and date:"2013-12-24 13:25:18" by FILE0003(2).MOV file.FileDate=2025-01-10 06:21:05 file.Description= file.Title=FILE0003.MOV file.FileSize=1345565230

As I see it compare by file.title it looks as issue

And it seems to me second issue, maybe it is same maybe not Immich-go RC always stuck if happens 2025-02-08 09:09:50 ERR upload error file=takeout-20250110T061340Z-001:Takeout/Google Фото/Photos from 2013/FILE0014(3).MOV error=AssetUpload, POST, http://192.168.2.6:2283/api/assets Post "http://192.168.2.6:2283/api/assets": dial tcp 192.168.2.6:2283: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Last stable version skip errors and continue working Honestly I don't know why this errors happens

nkrk avatar Feb 08 '25 05:02 nkrk

I uses v0.23.0-RC11 (previous RC seems works same)

nkrk avatar Feb 08 '25 05:02 nkrk

Immich-go uses the file name and the exact capture date and time to detect files that have been compressed and stored by Google, in order to replace them with their uncompressed versions obtained directly from the phone.

Google Photos add a bracketed number to the file name to manage the duplicates in the same year / folder. But this number is lost when immich-go uploads files to immich. However, the date of capture is taken from the related JSON file in the takeout, and this should be enough to discriminate photos having the same name but taken a different dates.

Using a hash code is not feasible because the goal is to detect the existence of two different files representing the same image but with varying qualities. This is a very useful feature of Immich-go.

Your example shows that the date used by Immich-go is precise down to the second, and it is likely that we have two versions of the same file compressed differently.

The upload error might be due to a timeout. A large file is being uploaded to Immich, and it takes a few minutes for Immich to process it. It is possible to adjust the timeout used by Immich-go. See here

simulot avatar Feb 15 '25 10:02 simulot