feat: add macOS disc scanner + API ingest endpoint

- scanner/scan_disc.py: polls optical drive via drutil, detects disc type
  (DVD/Blu-ray/Audio CD/Data CD), reads volume label, file/track count,
  posts to remote API, auto-ejects. Pure Python + requests, no drivers.
- scanner/requirements.txt + README.md: setup and usage docs
- videodb/api_ingest.php: authenticated POST endpoint that writes disc
  records directly into the videoDB MySQL schema; token stored in config
- docker-compose.yml: adds INGEST_API_TOKEN env var
- docker-entrypoint.sh: writes ingest_api_token into config.inc.php

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-11 09:58:11 +02:00
parent f55c91276e
commit 6002fc6e58
6 changed files with 451 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ DB_USER="${DB_USER:-videodb}"
DB_PASSWORD="${DB_PASSWORD:-videodb_secret}"
DB_NAME="${DB_NAME:-videodb}"
DB_PREFIX="${DB_PREFIX:-videodb_}"
INGEST_API_TOKEN="${INGEST_API_TOKEN:-changeme}"
CONFIG_FILE="/var/www/html/config.inc.php"
@@ -55,6 +56,7 @@ cat > "$CONFIG_FILE" <<PHP
\$config['xls_extra_fields'] = 'title (plot), diskid, genres, language, mediatype, runtime, year, custom1, custom2, custom3, custom4, insertdate, owner, lent';
\$config['dvdb_user'] = '';
\$config['dvdb_password'] = '';
\$config['ingest_api_token'] = '${INGEST_API_TOKEN}';
PHP
chown www-data:www-data "$CONFIG_FILE"