mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
fix(server): improved method signatures for stack and sidecar copying
This commit is contained in:
@@ -217,7 +217,7 @@ export class AssetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (stack) {
|
if (stack) {
|
||||||
await this.copyStack(sourceAsset, targetAsset);
|
await this.copyStack({ sourceAsset, targetAsset });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (favorite) {
|
if (favorite) {
|
||||||
@@ -225,14 +225,17 @@ export class AssetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sidecar) {
|
if (sidecar) {
|
||||||
await this.copySidecar(sourceAsset, targetAsset);
|
await this.copySidecar({ sourceAsset, targetAsset });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async copyStack(
|
private async copyStack({
|
||||||
sourceAsset: { id: string; stackId: string | null },
|
sourceAsset,
|
||||||
targetAsset: { id: string; stackId: string | null },
|
targetAsset,
|
||||||
) {
|
}: {
|
||||||
|
sourceAsset: { id: string; stackId: string | null };
|
||||||
|
targetAsset: { id: string; stackId: string | null };
|
||||||
|
}) {
|
||||||
if (!sourceAsset.stackId) {
|
if (!sourceAsset.stackId) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -245,10 +248,13 @@ export class AssetService extends BaseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async copySidecar(
|
private async copySidecar({
|
||||||
targetAsset: { sidecarPath: string | null },
|
sourceAsset,
|
||||||
sourceAsset: { id: string; sidecarPath: string | null; originalPath: string },
|
targetAsset,
|
||||||
) {
|
}: {
|
||||||
|
sourceAsset: { id: string; sidecarPath: string | null; originalPath: string };
|
||||||
|
targetAsset: { sidecarPath: string | null };
|
||||||
|
}) {
|
||||||
if (!targetAsset.sidecarPath) {
|
if (!targetAsset.sidecarPath) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user