fix(server): never try to parse Duration from exif data (#13497)
This commit is contained in:
@@ -339,7 +339,7 @@ export class MetadataService extends BaseService {
|
||||
const sidecarTags = asset.sidecarPath ? await this.metadataRepository.readTags(asset.sidecarPath) : {};
|
||||
const videoTags = asset.type === AssetType.VIDEO ? await this.getVideoTags(asset.originalPath) : {};
|
||||
|
||||
// make sure dates comes from sidecar
|
||||
// prefer dates from sidecar tags
|
||||
const sidecarDate = firstDateTime(sidecarTags as Tags, EXIF_DATE_TAGS);
|
||||
if (sidecarDate) {
|
||||
for (const tag of EXIF_DATE_TAGS) {
|
||||
@@ -347,6 +347,10 @@ export class MetadataService extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
// prefer duration from video tags
|
||||
delete mediaTags.Duration;
|
||||
delete sidecarTags.Duration;
|
||||
|
||||
return { ...mediaTags, ...videoTags, ...sidecarTags };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user