mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
feat(server): auto-link live photos (#1761)
* feat(server): auto-link live photos * fix: video extraction and linking
This commit is contained in:
@@ -378,6 +378,7 @@ export const sharedLinkStub = {
|
||||
isVisible: true,
|
||||
livePhotoVideoId: null,
|
||||
exifInfo: {
|
||||
livePhotoCID: null,
|
||||
id: 1,
|
||||
assetId: 'id_1',
|
||||
description: 'description',
|
||||
|
||||
@@ -44,6 +44,10 @@ export class ExifEntity {
|
||||
@Column({ type: 'varchar', nullable: true })
|
||||
city!: string | null;
|
||||
|
||||
@Index('IDX_live_photo_cid')
|
||||
@Column({ type: 'varchar', nullable: true })
|
||||
livePhotoCID!: string | null;
|
||||
|
||||
@Column({ type: 'varchar', nullable: true })
|
||||
state!: string | null;
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class AppleContentIdentifier1676437878377 implements MigrationInterface {
|
||||
name = 'AppleContentIdentifier1676437878377';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "exif" ADD "livePhotoCID" character varying`);
|
||||
await queryRunner.query(`CREATE INDEX "IDX_live_photo_cid" ON "exif" ("livePhotoCID") `);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`DROP INDEX "public"."IDX_live_photo_cid"`);
|
||||
await queryRunner.query(`ALTER TABLE "exif" DROP COLUMN "livePhotoCID"`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user