feat: person excludes for auto-organize rules, backup & restore system

Add person exclude criteria to Immich auto-organize — assets containing
excluded persons are filtered out after candidate gathering. Also adds
full backup/restore system with export, import, scheduled backups, and
retention management.
This commit is contained in:
2026-04-02 14:13:42 +03:00
parent 6e51164f8e
commit 6b2211353d
13 changed files with 2191 additions and 2 deletions
@@ -77,6 +77,16 @@ IMMICH_AUTO_ORGANIZE = ActionTypeDefinition(
"items": {"type": "string"},
"description": "Display names (UI only)",
},
"exclude_person_ids": {
"type": "array",
"items": {"type": "string"},
"description": "Immich person UUIDs — assets with these persons are excluded",
},
"exclude_person_names": {
"type": "array",
"items": {"type": "string"},
"description": "Display names for excluded persons (UI only)",
},
"query": {
"type": "string",
"description": "Smart search query (CLIP)",
@@ -255,6 +255,18 @@ class ImmichActionExecutor(ActionExecutor):
seen.add(aid)
result.append(aid)
# Exclude assets belonging to excluded persons
exclude_person_ids = criteria.get("exclude_person_ids", [])
if exclude_person_ids:
excluded_asset_ids: set[str] = set()
for pid in exclude_person_ids:
assets = await self._client.get_person_assets_all(pid)
for asset in assets:
aid = asset.get("id", "")
if aid:
excluded_asset_ids.add(aid)
result = [aid for aid in result if aid not in excluded_asset_ids]
return result
def _matches_filters(