1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-01 08:31:59 +00:00

fix(server): exif extraction swapped params (#1914)

This commit is contained in:
Michel Heusschen 2023-03-01 17:55:24 +01:00 committed by GitHub
parent 977740045a
commit 830f4268c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -183,8 +183,8 @@ export class MetadataExtractionProcessor {
if (newExif.livePhotoCID && !asset.livePhotoVideoId) {
const motionAsset = await this.assetRepository.findLivePhotoMatch(
newExif.livePhotoCID,
AssetType.VIDEO,
asset.id,
AssetType.VIDEO,
);
if (motionAsset) {
await this.assetRepository.save({ id: asset.id, livePhotoVideoId: motionAsset.id });
@ -294,8 +294,8 @@ export class MetadataExtractionProcessor {
if (newExif.livePhotoCID) {
const photoAsset = await this.assetRepository.findLivePhotoMatch(
newExif.livePhotoCID,
AssetType.IMAGE,
asset.id,
AssetType.IMAGE,
);
if (photoAsset) {
await this.assetRepository.save({ id: photoAsset.id, livePhotoVideoId: asset.id });

View file

@ -6,5 +6,5 @@ export interface IAssetRepository {
deleteAll(ownerId: string): Promise<void>;
getAll(): Promise<AssetEntity[]>;
save(asset: Partial<AssetEntity>): Promise<AssetEntity>;
findLivePhotoMatch(livePhotoCID: string, type: AssetType, otherAssetId: string): Promise<AssetEntity | null>;
findLivePhotoMatch(livePhotoCID: string, otherAssetId: string, type: AssetType): Promise<AssetEntity | null>;
}