mirror of
https://github.com/immich-app/immich.git
synced 2025-01-21 03:02:44 +01:00
fix(server): exif extraction swapped params (#1914)
This commit is contained in:
parent
977740045a
commit
830f4268c3
2 changed files with 3 additions and 3 deletions
|
@ -183,8 +183,8 @@ export class MetadataExtractionProcessor {
|
||||||
if (newExif.livePhotoCID && !asset.livePhotoVideoId) {
|
if (newExif.livePhotoCID && !asset.livePhotoVideoId) {
|
||||||
const motionAsset = await this.assetRepository.findLivePhotoMatch(
|
const motionAsset = await this.assetRepository.findLivePhotoMatch(
|
||||||
newExif.livePhotoCID,
|
newExif.livePhotoCID,
|
||||||
AssetType.VIDEO,
|
|
||||||
asset.id,
|
asset.id,
|
||||||
|
AssetType.VIDEO,
|
||||||
);
|
);
|
||||||
if (motionAsset) {
|
if (motionAsset) {
|
||||||
await this.assetRepository.save({ id: asset.id, livePhotoVideoId: motionAsset.id });
|
await this.assetRepository.save({ id: asset.id, livePhotoVideoId: motionAsset.id });
|
||||||
|
@ -294,8 +294,8 @@ export class MetadataExtractionProcessor {
|
||||||
if (newExif.livePhotoCID) {
|
if (newExif.livePhotoCID) {
|
||||||
const photoAsset = await this.assetRepository.findLivePhotoMatch(
|
const photoAsset = await this.assetRepository.findLivePhotoMatch(
|
||||||
newExif.livePhotoCID,
|
newExif.livePhotoCID,
|
||||||
AssetType.IMAGE,
|
|
||||||
asset.id,
|
asset.id,
|
||||||
|
AssetType.IMAGE,
|
||||||
);
|
);
|
||||||
if (photoAsset) {
|
if (photoAsset) {
|
||||||
await this.assetRepository.save({ id: photoAsset.id, livePhotoVideoId: asset.id });
|
await this.assetRepository.save({ id: photoAsset.id, livePhotoVideoId: asset.id });
|
||||||
|
|
|
@ -6,5 +6,5 @@ export interface IAssetRepository {
|
||||||
deleteAll(ownerId: string): Promise<void>;
|
deleteAll(ownerId: string): Promise<void>;
|
||||||
getAll(): Promise<AssetEntity[]>;
|
getAll(): Promise<AssetEntity[]>;
|
||||||
save(asset: Partial<AssetEntity>): 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>;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue