[pull] main from immich-app:main - #952
Merged
Merged
Conversation
…ata (#30900) `upsertExif` writes derived audio, video and keyframe metadata with an `ON CONFLICT DO UPDATE`, but every column in those three update lists assigns the stored row back to itself: bitrate: ref('asset_audio.bitrate') `SET bitrate = asset_audio.bitrate` is a self-assignment, so once a row exists nothing can change it. Re-running metadata extraction re-reads the file, builds a fresh snapshot, and then quietly discards it. The rest of the file already uses `excluded` for this, as does `plugin.repository.ts`. `asset_video.frameCount` had a second problem: it is supplied on insert but was missing from the update list, so it would have stayed stale even after the reference was corrected. Extraction is meant to be repeatable. Probing improves between releases, a file can be repaired or replaced, and a fix to how a stream is chosen is worthless if it cannot reach the assets that were already imported. An `upsert` that silently degrades to insert-only defeats all of that. Metadata extraction is the only caller that passes these three objects, and it passes a complete snapshot or nothing: each object is built from a single probe behind a guard, and `upsertExif` skips the branch entirely when the object is absent. So taking the incoming row cannot write partial values over good ones. The other three callers pass `exif` only, and every other reference to these tables is a read.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )