US05-02: Orchestrate Album Upload Batches (#72)

This commit was merged in pull request #72.
This commit is contained in:
2026-08-16 13:06:37 +02:00
parent dcbd492a0d
commit e4ae5da440
14 changed files with 1446 additions and 14 deletions

View File

@@ -24,7 +24,16 @@ _CHUNK = 1 << 20
def sha256_file(path: Path | str) -> str:
digest = hashlib.sha256()
return _digest_file(path, hashlib.sha256())
def sha1_file(path: Path | str) -> str:
"""SHA-1 of the file bytes. Not an identity hash here — it is the checksum
Immich/immich-go use to recognise an asset they already hold (concept §8)."""
return _digest_file(path, hashlib.sha1())
def _digest_file(path: Path | str, digest) -> str:
with open(path, "rb") as handle:
for chunk in iter(lambda: handle.read(_CHUNK), b""):
digest.update(chunk)