mirror of
https://github.com/immich-app/immich.git
synced 2025-02-11 01:18:24 -05:00
fix 331 (#335)
* 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:
parent
a205478a29
commit
c60e852226
2 changed files with 5 additions and 2 deletions
|
@ -72,7 +72,6 @@ export class AssetController {
|
||||||
): Promise<AssetFileUploadResponseDto> {
|
): Promise<AssetFileUploadResponseDto> {
|
||||||
try {
|
try {
|
||||||
const savedAsset = await this.assetService.createUserAsset(authUser, assetInfo, file.path, file.mimetype);
|
const savedAsset = await this.assetService.createUserAsset(authUser, assetInfo, file.path, file.mimetype);
|
||||||
|
|
||||||
if (!savedAsset) {
|
if (!savedAsset) {
|
||||||
throw new BadRequestException('Asset not created');
|
throw new BadRequestException('Asset not created');
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,9 +181,13 @@ export class MetadataExtractionProcessor {
|
||||||
if (videoTags) {
|
if (videoTags) {
|
||||||
if (videoTags['com.apple.quicktime.creationdate']) {
|
if (videoTags['com.apple.quicktime.creationdate']) {
|
||||||
createdAt = String(videoTags['com.apple.quicktime.creationdate']);
|
createdAt = String(videoTags['com.apple.quicktime.creationdate']);
|
||||||
} else {
|
} else if (videoTags['creation_time']) {
|
||||||
createdAt = String(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 });
|
await this.assetRepository.update({ id: asset.id }, { duration: durationString, createdAt: createdAt });
|
||||||
|
|
Loading…
Add table
Reference in a new issue