From 3b133dc4bbcc2e325a583ca6275d6f84fe02aa1b Mon Sep 17 00:00:00 2001 From: "alexei.dolgolyov" Date: Mon, 2 Feb 2026 15:02:25 +0300 Subject: [PATCH] Exclude archived assets from processing status check Co-Authored-By: Claude Opus 4.5 --- custom_components/immich_album_watcher/coordinator.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/custom_components/immich_album_watcher/coordinator.py b/custom_components/immich_album_watcher/coordinator.py index 122e899..b2c87d7 100644 --- a/custom_components/immich_album_watcher/coordinator.py +++ b/custom_components/immich_album_watcher/coordinator.py @@ -202,20 +202,22 @@ class AssetInfo: _asset_type: Asset type (IMAGE or VIDEO) - unused but kept for API stability Returns: - True if asset is fully processed and not trashed/offline, False otherwise + True if asset is fully processed and not trashed/offline/archived, False otherwise """ asset_id = data.get("id", "unknown") asset_type = data.get("type", "unknown") is_offline = data.get("isOffline", False) is_trashed = data.get("isTrashed", False) + is_archived = data.get("isArchived", False) thumbhash = data.get("thumbhash") _LOGGER.debug( - "Asset %s (%s): isOffline=%s, isTrashed=%s, thumbhash=%s", + "Asset %s (%s): isOffline=%s, isTrashed=%s, isArchived=%s, thumbhash=%s", asset_id, asset_type, is_offline, is_trashed, + is_archived, bool(thumbhash), ) @@ -229,6 +231,11 @@ class AssetInfo: _LOGGER.debug("Asset %s excluded: trashed", asset_id) return False + # Exclude archived assets + if is_archived: + _LOGGER.debug("Asset %s excluded: archived", asset_id) + return False + # Check if thumbnails have been generated # This works for both photos and videos - Immich always generates thumbnails # Note: The API doesn't expose video transcoding status (encodedVideoPath),