Add batch processing for pending OCR

This commit is contained in:
2026-07-17 22:17:19 +02:00
parent adf953cb78
commit 86c672de1e

View File

@ -528,6 +528,37 @@ Do not recreate the database this way after it contains manually maintained meta
OCR data must also be recreated if the database is deleted. OCR data must also be recreated if the database is deleted.
## OCR batch processing
Process all movies waiting for OCR:
```bash
scripts/process_pending_ocr.py
```
Limit the number of records:
```bash
scripts/process_pending_ocr.py --limit 5
```
Use a test database:
```bash
scripts/process_pending_ocr.py \
--database database/wcx-test.db \
--limit 1
```
The script selects movies with ocr_status = 'pending' and invokes
check_ocr.py once per movie. Processing continues if an individual movie
fails.
Possible results are:
completed
manual_review
failed
A summary is printed after the batch has finished.
GOOGLE_VISION_API_KEY must be available in the environment.
## Legacy CSV migration ## Legacy CSV migration
The historical index is stored in: The historical index is stored in: