MCPcopy
hub / github.com/immich-app/immich / syncAlbumsV2

Method syncAlbumsV2

server/src/services/sync.service.ts:444–456  ·  view source on GitHub ↗
(options: SyncQueryOptions, response: Writable, checkpointMap: CheckpointMap)

Source from the content-addressed store, hash-verified

442 }
443
444 private async syncAlbumsV2(options: SyncQueryOptions, response: Writable, checkpointMap: CheckpointMap) {
445 const deleteType = SyncEntityType.AlbumDeleteV1;
446 const deletes = this.syncRepository.album.getDeletes({ ...options, ack: checkpointMap[deleteType] });
447 for await (const { id, ...data } of deletes) {
448 send(response, { type: deleteType, ids: [id], data });
449 }
450
451 const upsertType = SyncEntityType.AlbumV2;
452 const upserts = this.syncRepository.album.getUpserts({ ...options, ack: checkpointMap[upsertType] });
453 for await (const { updateId, ...data } of upserts) {
454 send(response, { type: upsertType, ids: [updateId], data });
455 }
456 }
457
458 private async syncAlbumUsersV1(
459 options: SyncQueryOptions,

Callers 1

streamMethod · 0.95

Calls 3

sendFunction · 0.85
getDeletesMethod · 0.45
getUpsertsMethod · 0.45

Tested by

no test coverage detected