Skip to content

Fix gzip album reply - #2

Closed
airbone42 wants to merge 6 commits into
vanessa:mainfrom
airbone42:fix-gzip-album-reply
Closed

airbone42 wants to merge 6 commits into
vanessa:mainfrom
airbone42:fix-gzip-album-reply

Conversation

@airbone42

Copy link
Copy Markdown

No description provided.

airbone42 and others added 6 commits October 14, 2026 13:11
- Immich >= 3.2: album contents via POST /api/search/metadata using the
  structured filter shape and cursor pagination; assetCount cross-check;
  version check; trashed/hidden assets excluded to match assetCount
- Region via AP_TLD (default de): drive URL, EU/NA upload host and
  cookie names derived; AP_CONTENT_URL / AP_*_KEY / AP_USER_AGENT overrides
- Target is an Amazon Photos album (VISUAL_COLLECTION), found by name
  or created; uploads to root, then batched PATCH .../children
- Deletion only when all Immich data is complete; deletion brake
  (MAX_DELETE_FRACTION / MAX_DELETE_COUNT); AP_DELETE_MODE trash|album_only;
  adopted (pre-existing) Amazon nodes are never trashed
- DRY_RUN, *_FILE secrets, secret redaction in logs, filename sanitising,
  no redirect following (expired session -> exit 3)
- Streaming download/upload with MAX_FILE_MB, SYNC_TYPES, 409 resolution
  by MD5, atomic versioned state (v2) with migration, HEALTHCHECK_URL
- Container: non-root UID 10001, alpine pinned by digest, 0600 state/log,
  SIGTERM forwarding; README for local build only
- Replace GHCR push and Codacy workflows with a SHA-pinned CI workflow
- Tests: unittest with mocked urlopen covering pagination, brake,
  missing album, count mismatch, dry run, migration, filenames, regions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Immich >= 3.2 support via cursor-paginated search, amazon.de as default
region, Amazon Photos album as sync target, deletion brake, dry run,
secrets from files, non-root container, German setup guide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ums, reboot

- Using an existing Amazon Photos album and verifying its ID in the dry run
- IMMICH_URL via hostname/IP instead of a shared Docker network
- Simpler cookie lookup via DevTools Application/Storage tab
- Tuning the deletion brake for albums that change completely and often
- Behaviour after a Docker host reboot

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
amazon.de answers album add/remove gzip-compressed without being asked to.
urllib does not decode it, so json.loads failed with "'utf-8' codec can't
decode byte 0x8b" although the request succeeded. The nodes stayed in
pending_album_add and every run ended with errors (exit code 1).

_request now decompresses when Content-Encoding is gzip or the body starts
with the gzip magic bytes. Test: gzip reply to the album add counts as success.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EwrRMu3NizWuJ5xapVnYd5
@airbone42 airbone42 closed this Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant