From 82db4eb794ee2ad7d1eae0cf1fb42a6402170b7e Mon Sep 17 00:00:00 2001 From: Till JS Date: Thu, 7 May 2026 14:25:43 +0200 Subject: [PATCH] feat(cards-web): Anki import carries images + audio along MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes the gap from the first Anki-import pass: media files are now uploaded alongside the cards instead of stripped. Pipeline: • parse.ts: read the .apkg's `media` JSON manifest, build a filename → ZIP-entry map (Anki names files numerically; the manifest is the original-name lookup table). Returned alongside decks/cards as parsed.mediaByFilename. • import.ts: collectMediaRefs() walks every card field, gathers distinct and [sound:…] references — orphan media bundled in the .apkg are ignored. Referenced files upload to mana-media in 4 parallel workers, returning a filename → URL map. • parse.sanitizeAnkiHtml() now takes that map: , [sound:Y] →