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),