fix: metadata extraction race condition (#25866)

This commit is contained in:
Daniel Dietzler 2026-02-03 18:03:27 +01:00 committed by GitHub
parent af1ecaf5cc
commit 2990bde0bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -307,7 +307,6 @@ export class MetadataService extends BaseService {
const assetHeight = isSidewards ? validate(width) : validate(height);
const promises: Promise<unknown>[] = [
this.assetRepository.upsertExif(exifData, { lockedPropertiesBehavior: 'skip' }),
this.assetRepository.update({
id: asset.id,
duration: this.getDuration(exifTags),
@ -322,6 +321,7 @@ export class MetadataService extends BaseService {
}),
];
await this.assetRepository.upsertExif(exifData, { lockedPropertiesBehavior: 'skip' });
await this.applyTagList(asset);
if (this.isMotionPhoto(asset, exifTags)) {