Skip to content

High performance self-hosted photo and video management solution.

fix(web): add partner photo to album from multiselect (#27767)

Yaros81780b0cc015
diff --git a/web/src/lib/services/asset.service.ts b/web/src/lib/services/asset.service.ts
index b1d53f1977..95312408fa 100644
--- a/web/src/lib/services/asset.service.ts
+++ b/web/src/lib/services/asset.service.ts
@@ -48,11 +48,9 @@ import type { MessageFormatter } from 'svelte-i18n';
export const getAssetBulkActions = ($t: MessageFormatter) => {
const ownedAssets = assetMultiSelectManager.ownedAssets;
- const assetIds = ownedAssets.map((asset) => asset.id);
- const isAllVideos = ownedAssets.every((asset) => asset.isVideo);
const onAction = async (name: AssetJobName) => {
- await handleRunAssetJob({ name, assetIds });
+ await handleRunAssetJob({ name, assetIds: ownedAssets.map(({ id }) => id) });
assetMultiSelectManager.clear();
};
@@ -60,7 +58,8 @@ export const getAssetBulkActions = ($t: MessageFormatter) => {
title: $t('add_to_album'),
icon: mdiPlus,
shortcuts: [{ key: 'l' }],
- onAction: () => modalManager.show(AssetAddToAlbumModal, { assetIds }),
+ onAction: () =>
+ modalManager.show(AssetAddToAlbumModal, { assetIds: assetMultiSelectManager.assets.map((asset) => asset.id) }),
};
const RefreshFacesJob: ActionItem = {
@@ -85,7 +84,7 @@ export const getAssetBulkActions = ($t: MessageFormatter) => {
title: $t('refresh_encoded_videos'),
icon: mdiCogRefreshOutline,
onAction: () => onAction(AssetJobName.TranscodeVideo),
- $if: () => isAllVideos,
+ $if: () => ownedAssets.every((asset) => asset.isVideo),
};
return { AddToAlbum, RefreshFacesJob, RefreshMetadataJob, RegenerateThumbnailJob, TranscodeVideoJob };