Skip to content

Add "Add All" and "Sync All" buttons to Albums view#5

Open
b0x42 wants to merge 2 commits into
bytePatrol:mainfrom
b0x42:feat/album-add-all-sync-all
Open

Add "Add All" and "Sync All" buttons to Albums view#5
b0x42 wants to merge 2 commits into
bytePatrol:mainfrom
b0x42:feat/album-add-all-sync-all

Conversation

@b0x42

@b0x42 b0x42 commented Jun 6, 2026

Copy link
Copy Markdown

Problem

The Albums view requires clicking "Add to Immich" and "Sync" individually for every album. With many albums this is tedious — there's no way to bulk-add or bulk-sync in one go.

Solution

  • Add All — appears next to "Load Albums" once unmapped albums are loaded. Queues every unmapped album to Immich sequentially. Shows "Adding…" while in progress.
  • Sync All — appears in the Synced Albums section header. Syncs every mapped album in sequence, updating asset counts as each one finishes. Shows "Syncing…" while in progress.

Both buttons are disabled during their operation, surface an error message if any single album fails, and stop early rather than silently skipping failures.

Test plan

  • Load albums → "Add All" appears → click it → all albums move to Synced Albums
  • "Sync All" appears in Synced Albums header → click it → asset counts populate
  • Error mid-run shows error message and stops

b0x42 and others added 2 commits June 6, 2026 20:07
OperationQueue() defaults to concurrent, so URLSession was firing
delegate callbacks on multiple threads simultaneously. This caused
data races on loggedMilestones (Set<Int>), corrupting the heap and
producing SIGSEGV/SIGABRT/EXC_BREAKPOINT crashes in UploadProgressDelegate,
CFNetwork's nghttp2 stack, and the JSON decoder.

Setting maxConcurrentOperationCount = 1 makes the queue serial,
matching the existing "serial delegate queue" comment and eliminating
the race.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- "Add All" appears next to "Load Albums" once unmapped albums are loaded;
  queues all unmapped albums to Immich sequentially
- "Sync All" appears in the Synced Albums header; syncs every mapped album
  in sequence, updating asset counts as each finishes
- Both buttons show a disabled "Adding…" / "Syncing…" state while in progress
  and surface an error message if any single album fails

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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