mirror of
https://github.com/immich-app/immich.git
synced 2025-12-01 22:09:46 +09:00
feat(web): bulk deduplicate (#10448)
* bulk deduplicate * notification for keeping all duplicates * fix notification * remove unused text * pr feedback * wording * formatting
This commit is contained in:
@@ -15,9 +15,11 @@ import {
|
||||
linkOAuthAccount,
|
||||
startOAuth,
|
||||
unlinkOAuthAccount,
|
||||
type AssetResponseDto,
|
||||
type SharedLinkResponseDto,
|
||||
} from '@immich/sdk';
|
||||
import { mdiCogRefreshOutline, mdiDatabaseRefreshOutline, mdiImageRefreshOutline } from '@mdi/js';
|
||||
import { sortBy } from 'lodash-es';
|
||||
import { t } from 'svelte-i18n';
|
||||
import { derived, get } from 'svelte/store';
|
||||
|
||||
@@ -310,3 +312,7 @@ export const withError = async <T>(fn: () => Promise<T>): Promise<[undefined, T]
|
||||
return [error, undefined];
|
||||
}
|
||||
};
|
||||
|
||||
export const suggestDuplicateByFileSize = (assets: AssetResponseDto[]): AssetResponseDto | undefined => {
|
||||
return sortBy(assets, (asset) => asset.exifInfo?.fileSizeInByte).pop();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user