Expand description
Performs a startup catch-up scan for files that were missed while Mimick was not running.
The scan runs in two stages:
- Enumerate (parallel, sync) β uses
rayonto walk all watch paths concurrently, collecting candidate files with their filesystem fingerprints. - Decide + queue (bounded async) β resolves album IDs, checks the sync index, hashes only when needed, and queues uploads with bounded concurrency.
StructsΒ§
- Scan
Candidate π - A file discovered during the parallel enumeration stage.
FunctionsΒ§
- effective_
album_ πname - Resolve the effective album name for a file using per-folder configuration.
- enumerate_
candidates π - Stage 1: Walk all watch paths in parallel using rayon.
- execute_
reconcile_ πdiff - filter_
and_ πreassociate_ existing - find_
album_ πasset_ id_ by_ checksum - Find the remote asset ID matching the given checksum inside an album.
- hash_
to_ πtask - Hash a candidate file and submit it to the upload queue.
- process_
reassociation π - prune_
index_ πentries_ for_ missing_ files - queue_
unsynced_ files - Scans watch folders at startup and queues new, changed, or retargeted files for upload.
- reconcile_
entry - Reconcile a single watch entry against its remote album: download new items, trash local files removed from the album, and trash remote items missing locally β gated by the entryβs per-folder rules.
- resolve_
album π - Resolve an album ID, creating the album if it doesnβt exist yet. Caches the result for reuse by other candidates in the same folder.
- resolve_
album_ πids_ for_ candidates - should_
skip_ πfor_ catchup - sync_
album_ πto_ folder_ entries - Parallel reconcile for each watch path entry against their remote albums.
- trash_
remote_ πasset_ by_ checksum - Locate and move a remote asset to Immich trash by looking up its checksum in an album.
- trash_
remote_ πassets_ for_ missing_ local_ files - Trash remote Immich assets when their corresponding local file has been removed.