1
0
mirror of https://github.com/immich-app/immich.git synced 2025-01-12 15:32:36 +02:00
* fix #331 - Video with no date information in EXIF upload via web caused mobile client not able to render other assets
This commit is contained in:
Alex 2022-07-12 16:34:43 -05:00 committed by GitHub
parent a205478a29
commit c60e852226
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -72,7 +72,6 @@ export class AssetController {
): Promise<AssetFileUploadResponseDto> {
try {
const savedAsset = await this.assetService.createUserAsset(authUser, assetInfo, file.path, file.mimetype);
if (!savedAsset) {
throw new BadRequestException('Asset not created');
}

View File

@ -181,9 +181,13 @@ export class MetadataExtractionProcessor {
if (videoTags) {
if (videoTags['com.apple.quicktime.creationdate']) {
createdAt = String(videoTags['com.apple.quicktime.creationdate']);
} else {
} else if (videoTags['creation_time']) {
createdAt = String(videoTags['creation_time']);
} else {
createdAt = asset.createdAt;
}
} else {
createdAt = asset.createdAt;
}
await this.assetRepository.update({ id: asset.id }, { duration: durationString, createdAt: createdAt });