mirror of
https://github.com/immich-app/immich.git
synced 2026-07-28 14:47:30 -07:00
chore: update tag filter method declaration
This commit is contained in:
@@ -142,6 +142,24 @@ const methods = wrapper<Manifest>({
|
||||
return { workflow: { continue: hasTimeZone === needsTimeZone } };
|
||||
},
|
||||
|
||||
assetTagFilter: ({ config, data }) => {
|
||||
const assetTags = data.asset.tags.map((tag) => tag.id);
|
||||
|
||||
for (const tag of config.tags) {
|
||||
if (assetTags.includes(tag)) {
|
||||
if (config.matching === 'any') {
|
||||
break;
|
||||
} else if (config.matching === 'none') {
|
||||
return { workflow: { continue: false } };
|
||||
}
|
||||
} else if (config.matching === 'all') {
|
||||
return { workflow: { continue: false } };
|
||||
}
|
||||
}
|
||||
|
||||
return { workflow: { continue: true } };
|
||||
},
|
||||
|
||||
assetTypeFilter: ({ config, data }) => {
|
||||
return { workflow: { continue: config.allowedTypes.includes(data.asset.type) } };
|
||||
},
|
||||
@@ -177,6 +195,7 @@ const {
|
||||
assetLocationFilter,
|
||||
assetLock,
|
||||
assetMissingTimeZoneFilter,
|
||||
assetTagFilter,
|
||||
assetTypeFilter,
|
||||
assetVisibility,
|
||||
webhook,
|
||||
@@ -193,6 +212,7 @@ export {
|
||||
assetLocationFilter,
|
||||
assetLock,
|
||||
assetMissingTimeZoneFilter,
|
||||
assetTagFilter,
|
||||
assetTypeFilter,
|
||||
assetVisibility,
|
||||
webhook,
|
||||
|
||||
Reference in New Issue
Block a user