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

* fix(web): add partner photo to album

* chore: fix formatting

* fix: run-job assets

---------

Co-authored-by: Jason Rasmussen <jason@rasm.me>
This commit is contained in:
Yaros 2026-04-14 18:48:39 +02:00 committed by GitHub
parent 5e81a5a054
commit 81780b0cc0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 };