Open waclaw66 opened 11 months ago
Any update on this very annoying bug? Seems it would help to recalculate hash again before upload.
@jrasm91 why you've remove bug label? I think it's clearly a bug when an asset with the same content is local and remote however shown twice. I can understand when an asset is modified on device after the upload, then those are different. The main problem is that a file hash is calculated only when a file is discovered within Immich, file hash should be recalculated at least before asset is uploaded. @fyfrey seems you made some code around it, what do you think about it, would it be possible to add hashing before upload? It would solve most of problems, when a taken picture is finetuned on the device (rotation, crop, ...).
Hashing again when uploading does not solve much (only a specific case). You can edit the file on device after backup and have even worse issues. :-)
We'd probably need write our own platform native code to reliably get notified by the system if any media files were changed and re-hash all affected assets. We are currently using the photo manager library that does not provide such features afaik.
Hashing again when uploading does not solve much (only a specific case). You can edit the file on device after backup and have even worse issues. :-)
It's specific, but covers the main issue, that a new modified file appers twice when it's uploaded. It's very annoying everyday topic and incomprehensible to users. Same file on both sides, but shown twice because local has stale checksum. On the other hand editing after upload should show the asset twice, because it has different checksum. GPhotos also behaves in this way.
We'd probably need write our own platform native code to reliably get notified by the system if any media files were changed and re-hash all affected assets. We are currently using the photo manager library that does not provide such features afaik.
That would help, however it's much more complex than my proposed fix.
Would be good to know if a file has been changed without hashing it again. Does modifying the image alter it's modified date in the Android MediaStore? Photo manager extracts this value and we can check if a modified date is newer than that value in our database. That be much preferable to blindly hashing everything. As a bonus, we could also use it to detect changes after upload.
The bug
Asset that has been modified (even before upload) is shown twice when it's uploaded. The only way how to get rid of that is to remove both.
The OS that Immich Server is running on
Fedora 39
Version of Immich Server
v.1.91.4
Version of Immich Mobile App
v.1.91.4
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
Additional information
No response