diff --git a/mobile/openapi/lib/model/sync_asset_v1.dart b/mobile/openapi/lib/model/sync_asset_v1.dart index 1ca6e20cf..4c42d08a5 100644 Binary files a/mobile/openapi/lib/model/sync_asset_v1.dart and b/mobile/openapi/lib/model/sync_asset_v1.dart differ diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.json index 492d3cfec..71329c3f7 100644 --- a/open-api/immich-openapi-specs.json +++ b/open-api/immich-openapi-specs.json @@ -13818,6 +13818,10 @@ "isFavorite": { "type": "boolean" }, + "livePhotoVideoId": { + "nullable": true, + "type": "string" + }, "localDateTime": { "format": "date-time", "nullable": true, @@ -13829,6 +13833,10 @@ "ownerId": { "type": "string" }, + "stackId": { + "nullable": true, + "type": "string" + }, "thumbhash": { "nullable": true, "type": "string" @@ -13856,9 +13864,11 @@ "fileModifiedAt", "id", "isFavorite", + "livePhotoVideoId", "localDateTime", "originalFileName", "ownerId", + "stackId", "thumbhash", "type", "visibility" diff --git a/server/src/database.ts b/server/src/database.ts index a89299fbe..d42b2618a 100644 --- a/server/src/database.ts +++ b/server/src/database.ts @@ -349,6 +349,8 @@ export const columns = { 'asset.isFavorite', 'asset.visibility', 'asset.duration', + 'asset.livePhotoVideoId', + 'asset.stackId', ], syncAlbumUser: ['album_user.albumsId as albumId', 'album_user.usersId as userId', 'album_user.role'], syncStack: ['stack.id', 'stack.createdAt', 'stack.updatedAt', 'stack.primaryAssetId', 'stack.ownerId'], diff --git a/server/src/dtos/sync.dto.ts b/server/src/dtos/sync.dto.ts index abd7d7b69..8ba73271e 100644 --- a/server/src/dtos/sync.dto.ts +++ b/server/src/dtos/sync.dto.ts @@ -96,6 +96,8 @@ export class SyncAssetV1 { isFavorite!: boolean; @ApiProperty({ enumName: 'AssetVisibility', enum: AssetVisibility }) visibility!: AssetVisibility; + livePhotoVideoId!: string | null; + stackId!: string | null; } @ExtraModel() diff --git a/server/src/queries/sync.repository.sql b/server/src/queries/sync.repository.sql index 2f484f6d5..4782eedf1 100644 --- a/server/src/queries/sync.repository.sql +++ b/server/src/queries/sync.repository.sql @@ -64,6 +64,8 @@ select "asset"."isFavorite", "asset"."visibility", "asset"."duration", + "asset"."livePhotoVideoId", + "asset"."stackId", "asset"."updateId" from "asset" @@ -91,6 +93,8 @@ select "asset"."isFavorite", "asset"."visibility", "asset"."duration", + "asset"."livePhotoVideoId", + "asset"."stackId", "asset"."updateId" from "asset" @@ -351,6 +355,8 @@ select "asset"."isFavorite", "asset"."visibility", "asset"."duration", + "asset"."livePhotoVideoId", + "asset"."stackId", "asset"."updateId" from "asset" @@ -539,6 +545,8 @@ select "asset"."isFavorite", "asset"."visibility", "asset"."duration", + "asset"."livePhotoVideoId", + "asset"."stackId", "asset"."updateId" from "asset" @@ -584,6 +592,8 @@ select "asset"."isFavorite", "asset"."visibility", "asset"."duration", + "asset"."livePhotoVideoId", + "asset"."stackId", "asset"."updateId" from "asset" diff --git a/server/src/services/job.service.ts b/server/src/services/job.service.ts index 645b22249..37a66706c 100644 --- a/server/src/services/job.service.ts +++ b/server/src/services/job.service.ts @@ -380,6 +380,8 @@ export class JobService extends BaseService { deletedAt: asset.deletedAt, isFavorite: asset.isFavorite, visibility: asset.visibility, + livePhotoVideoId: asset.livePhotoVideoId, + stackId: asset.stackId, }, exif: { assetId: exif.assetId, diff --git a/server/test/medium/specs/sync/sync-album-asset.spec.ts b/server/test/medium/specs/sync/sync-album-asset.spec.ts index 6bfb6b5d2..41700d29d 100644 --- a/server/test/medium/specs/sync/sync-album-asset.spec.ts +++ b/server/test/medium/specs/sync/sync-album-asset.spec.ts @@ -36,6 +36,8 @@ describe(SyncRequestType.AlbumAssetsV1, () => { localDateTime: date, deletedAt: null, duration: '0:10:00.00000', + livePhotoVideoId: null, + stackId: null, }); const { album } = await ctx.newAlbum({ ownerId: user2.id }); await ctx.newAlbumAsset({ albumId: album.id, assetId: asset.id }); @@ -60,6 +62,8 @@ describe(SyncRequestType.AlbumAssetsV1, () => { type: asset.type, visibility: asset.visibility, duration: asset.duration, + livePhotoVideoId: asset.livePhotoVideoId, + stackId: asset.stackId, }, type: SyncEntityType.AlbumAssetV1, }, diff --git a/server/test/medium/specs/sync/sync-asset.spec.ts b/server/test/medium/specs/sync/sync-asset.spec.ts index 860329602..52d6bcb52 100644 --- a/server/test/medium/specs/sync/sync-asset.spec.ts +++ b/server/test/medium/specs/sync/sync-asset.spec.ts @@ -57,6 +57,8 @@ describe(SyncEntityType.AssetV1, () => { type: asset.type, visibility: asset.visibility, duration: asset.duration, + stackId: null, + livePhotoVideoId: null, }, type: 'AssetV1', }, diff --git a/server/test/medium/specs/sync/sync-partner-asset.spec.ts b/server/test/medium/specs/sync/sync-partner-asset.spec.ts index d9655add5..2daa750bf 100644 --- a/server/test/medium/specs/sync/sync-partner-asset.spec.ts +++ b/server/test/medium/specs/sync/sync-partner-asset.spec.ts @@ -63,6 +63,8 @@ describe(SyncRequestType.PartnerAssetsV1, () => { type: asset.type, visibility: asset.visibility, duration: asset.duration, + stackId: null, + livePhotoVideoId: null, }, type: SyncEntityType.PartnerAssetV1, },