fix(server): allow clearing asset description to blank#26900
Closed
saurav61091 wants to merge 1 commit intoimmich-app:mainfrom
Closed
fix(server): allow clearing asset description to blank#26900saurav61091 wants to merge 1 commit intoimmich-app:mainfrom
saurav61091 wants to merge 1 commit intoimmich-app:mainfrom
Conversation
When a user clears a description, exiftool treats empty strings as "delete field" and removes the tags from the sidecar. Then unlockProperties removes the lock, allowing the next metadata extraction to overwrite the empty DB value with the EXIF-embedded description. Fix: skip writing empty description to sidecar (since exiftool would just delete it) and keep 'description' in lockedProperties so subsequent extractions preserve the user's intent of an empty description. Fixes immich-app#19168
|
Label error. Requires exactly 1 of: changelog:.*. Found: 🗄️server. A maintainer will add the required label. |
Member
|
Please fill out the complete PR template |
Author
|
Hi @bo0tzz, I've updated the PR description with the complete template. Could you take another look? Thanks! |
Member
|
Superseded by #27025 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When a user clears an asset's description to blank, the description reverts to the EXIF-embedded value on the next metadata extraction.
Root cause: exiftool treats empty strings as "delete field", removing tags from the sidecar. Then
unlockPropertiesremoves the lock ondescription, allowing the next metadata extraction to overwrite the empty DB value with the original EXIF-embedded description.Fix:
descriptioninlockedPropertieswhen explicitly cleared, so subsequent metadata extractions preserve the user's intentFixes #19168
How Has This Been Tested?
Screenshots (if appropriate)
N/A — server-side logic fix, no UI changes.
Checklist:
src/services/uses repositories implementations for database calls, filesystem operations, etc.Please describe to which degree, if any, an LLM was used in creating this pull request.
An LLM (Claude) was used to assist with understanding the metadata extraction pipeline, identifying the root cause across the sidecar write and unlock flow, and drafting the fix. I reviewed the changes and confirmed the approach handles the edge cases correctly.