• bvandeusen released this 2026-05-23 12:19:31 -04:00 | 755 commits to dev since this release

    Patch release rolling up two post-migration fixes.

    Fixes

    • Serve /images/<path> from disk: without this route, the SPA catch-all swallowed every thumbnail/original URL and returned index.html, causing the aspect-ratio-shaped grey placeholders in Showcase and Gallery. Added a guarded send_from_directory route registered before the SPA fallback.

    Features

    • /api/migrate/cleanup migrator: targeted destructive cleanup — deletes every image_record attributed to one artist (CASCADE handles image_tag, image_provenance, series_page, tag_suggestion_rejection), unlinks originals + thumbnails on disk, optionally sweeps import_task rows under a given source_path_prefix, removes empty import_batch rows, and finally deletes the artist row. Built for the IR-migration rescue case where the scan derived a bogus imagerepo artist from a mismatched bind-mount layout. Honors dry_run for a safe preview; requires force: true to bypass the pre-migration backup guard.

    Operator workflow for the IR re-do

    After pulling this image and force-updating services:

    # 1. Dry-run to verify scope (no writes)
    curl -sX POST http://curator.traefik.internal/api/migrate/cleanup \
      -H 'Content-Type: application/json' \
      -d '{"slug":"imagerepo","dry_run":true,"force":true}'
    
    # 2. Actually wipe the IR import
    curl -sX POST http://curator.traefik.internal/api/migrate/cleanup \
      -H 'Content-Type: application/json' \
      -d '{"slug":"imagerepo","force":true,"source_path_prefix":"/import/imagerepo"}'
    
    # 3. Poll until complete
    curl -s http://curator.traefik.internal/api/migrate/runs/<id> | jq
    

    Then change the IR bind mount in docker-compose.yml from /var/lib/imagerepo/images:/import/imagerepo:ro/var/lib/imagerepo/images:/import:ro so the scan sees <artist>/<file> as the top level. Re-trigger scan, then re-run tag_apply (the manifest at /images/_migration_state/ir_tag_manifest.json survives the cleanup).

    Downloads