Files
Malin 7d401b1963 feat: photo gallery indexing — one record per folder, full filename search
scanner/scan_disc.py:
- Inventory disc into video files + photo folders (grouped by directory)
- Photo extensions: jpg/jpeg/png/gif/tiff/bmp/heic/heif/webp + raw formats
  (cr2 cr3 nef arw dng orf rw2 raf)
- Video disc   → 1 record per disc with video file list
- Photo disc   → 1 record per gallery folder with photo list
- Mixed disc   → both: 1 video record + 1 record per photo folder
- Unknown disc → 1 fallback record with total file count
- Folder title format: "DISC_LABEL — Folder / Subfolder"

videodb/api_ingest.php:
- Add subtitle field (gallery folder path)
- Add plot field (TEXT — full filename list, no 255-char limit)
- Add custom3 field (content type: video | photo | mixed | data)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 10:15:56 +02:00
..

MeDBia Disc Scanner (macOS)

Runs on your Mac — polls the optical drive, reads the disc, sends the record to the remote Docker stack, ejects.

One-time setup

# Install Python dependency
pip3 install requests

# Set your server URL and the API token from docker-compose.yml
export VIDEODB_URL=http://your-server:6761
export VIDEODB_TOKEN=change_this_secret_token

Run

cd scanner
python3 scan_disc.py

Then insert discs one by one. Each disc is:

  1. Detected (polled every 5 s)
  2. Read — volume label, disc type, size, file/track count
  3. Submitted to the remote videoDB
  4. Ejected automatically

Environment variables

Variable Default Description
VIDEODB_URL http://your-server:6761 Base URL of the Docker stack
VIDEODB_TOKEN change_this_secret_token Must match INGEST_API_TOKEN in docker-compose.yml
POLL_INTERVAL 5 Seconds between drive checks

What gets indexed per disc

Field Source
Title Volume label (disc name as burned)
Media type Auto-detected: DVD / Blu-ray / CD
Comment Track count (audio) or file count (data)
File size Total used space on disc
Custom 1 Raw drutil type string
Custom 2 Track or file count (number only)

All entries are immediately visible and searchable in the videoDB web UI at http://your-server:6761.

macOS permissions

If macOS asks for permission to control the disc drive or access /Volumes/, allow it. The script uses drutil, diskutil, and df — all standard macOS CLI tools, no third-party drivers needed.

Blu-ray note

macOS does not include a Blu-ray filesystem driver by default. Blu-ray discs will show as unreadable in Finder but drutil status will still report BD-ROM. The scanner will detect the type from drutil and index it, but file listing will be unavailable. Volume label may show as the device node instead of the disc name in that case — you can edit the entry in the web UI afterwards.