Mediathek docs

Decisions

ADR-0013 — A source says what it is for: keep in sync, clean up once, or just look

Status: Accepted · Date: 2026-11-06 · Concerns the edge (mediathek-digitalhome-edge) · Refines ADR-0012

Context

ADR-0012 gave the edge one right to change a source: moving extra copies into a bin on the same drive. Onboarding ended with step 4, "Make it a store", which also published everything new on the drive.

Using it on a real 1 TB drive showed three problems:

Decision

Every source has a role, chosen when it is added (sources.role):

Role Icon Meaning Allowed for
store 🔁 Keep in sync (copy): the folder stays the home of its pictures, and the Mediathek gets a copy. local folders and drives
once 🧹 Clean up once (move): the folder is emptied into the Mediathek through the bin. local folders and drives
look 👁 Just look: only listed and compared, never changed. every source; the only role for S3, ZIP and Google pick folders

A source made before roles existed is look, or store if it was a store.

The role decides the steps.

Publishing always goes through Preview and Publish, in the page's mode.

A store's ongoing sync publishes only the kinds published from it by hand. Publishing with a source records the scope (photos or videos) in sources.published_scopes. sync_store then publishes new files of those scopes only. Switching the page to films once therefore never starts uploading every film of every store.

The bin is checked before it is emptied (check_bin, job onboard-checkbin).

The Sources screen leads with this.

Consequences