mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
Merge branch 'fix/asset-service-argument-order' of https://github.com/immich-app/immich into feat/sidecar-asset-files
This commit is contained in:
@@ -227,7 +227,7 @@ export class AssetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (stack) {
|
if (stack) {
|
||||||
await this.copyStack(sourceAsset, targetAsset);
|
await this.copyStack({ sourceAsset, targetAsset });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (favorite) {
|
if (favorite) {
|
||||||
@@ -235,14 +235,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;
|
||||||
}
|
}
|
||||||
@@ -255,10 +258,17 @@ export class AssetService extends BaseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async copySidecar(
|
private async copySidecar({
|
||||||
sourceAsset: { id: string; files: AssetFile[] | undefined; originalPath: string },
|
sourceAsset,
|
||||||
targetAsset: { files: AssetFile[] | undefined },
|
targetAsset,
|
||||||
) {
|
}: {
|
||||||
|
sourceAsset: { id: string; files: AssetFile[] | null; originalPath: string };
|
||||||
|
targetAsset: { files: AssetFile[] | null };
|
||||||
|
}) {
|
||||||
|
if (!targetAsset.files) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const targetSidecarFile = getAssetFiles(targetAsset.files).sidecarFile;
|
const targetSidecarFile = getAssetFiles(targetAsset.files).sidecarFile;
|
||||||
|
|
||||||
if (!targetSidecarFile) {
|
if (!targetSidecarFile) {
|
||||||
|
|||||||
Reference in New Issue
Block a user