mirror of
https://github.com/immich-app/immich.git
synced 2026-06-27 22:35:57 +00:00
chore: update workflow method wrapper type
This commit is contained in:
@@ -41,9 +41,7 @@ const matchValueResult = (value: string, config: MatchValueConfig) => {
|
||||
};
|
||||
|
||||
export const assetFileFilter = () => {
|
||||
return wrapper<'assetFileFilter'>(({ data, config }) => (
|
||||
matchValueResult(data.asset.originalFileName || '', config),
|
||||
);
|
||||
return wrapper<'assetFileFilter'>(({ data, config }) => matchValueResult(data.asset.originalFileName || '', config));
|
||||
};
|
||||
|
||||
export const assetMissingTimeZoneFilter = () => {
|
||||
@@ -93,32 +91,8 @@ export const assetLocationFilter = () => {
|
||||
});
|
||||
};
|
||||
|
||||
type AssetExifFilterConfig = MatchValueConfig & {
|
||||
property:
|
||||
| 'make'
|
||||
| 'model'
|
||||
| 'exifImageWidth'
|
||||
| 'exifImageHeight'
|
||||
| 'fileSizeInByte'
|
||||
| 'orientation'
|
||||
| 'lensModel'
|
||||
| 'fNumber'
|
||||
| 'focalLength'
|
||||
| 'iso'
|
||||
| 'description'
|
||||
| 'fps'
|
||||
| 'exposureTime'
|
||||
| 'livePhotoCID'
|
||||
| 'timeZone'
|
||||
| 'projectionType'
|
||||
| 'profileDescription'
|
||||
| 'colorspace'
|
||||
| 'bitsPerSample'
|
||||
| 'rating';
|
||||
};
|
||||
|
||||
export const assetExifFilter = () => {
|
||||
return wrapper<WorkflowType.AssetV1, AssetExifFilterConfig>(({ config, data }) => {
|
||||
return wrapper<'assetExifFilter'>(({ config, data }) => {
|
||||
if (!data.asset.exifInfo) {
|
||||
return { workflow: { continue: false } };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user