Commit Graph

10 Commits

Author SHA1 Message Date
Ethanfel 39f873bec2 fix: server bug fixes from review
- DB: add threading.Lock on all write methods and multi-step reads
- export.py: check audio extraction return code, raise on failure
- routes/export: counter race condition fix with _counter_lock
- routes/export: delete validation accepts EXPORT_DIR_suffix siblings
- routes/export: evict old finished jobs to prevent unbounded growth
- client plan: fix 10 bugs (mpv IPC, encodePath, input_path sep, etc.)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 19:53:38 +02:00
Ethanfel b09ba3fa9e fix: third-pass review bugs
- Switch DELETE /export to query param (path param strips leading /)
- Add CropKeyframe Pydantic model for typed keyframe validation
- Convert keyframes to tuples before passing to apply_keyframes_to_jobs
- Remove dead QFrame import from main.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 14:20:20 +02:00
Ethanfel 5b7a55a05d fix: second-pass review bugs in server and core
- ExportRunner: stop batch on first error (was continuing, overwriting
  error status with done)
- Export route: validate input_path against MEDIA_DIRS
- Export route: validate encoder, portrait_ratio, folder_suffix, name
- Export route: fix format check for WebP sequence
- Export route: add _ separator in folder_suffix (match GUI)
- Export route: use realpath consistently in delete endpoint
- Export route: drop runner ref on completion (prevent memory leak)
- ProcessedDB: use cursor-level row_factory (thread-safe)
- WebSocket: catch all exceptions in connect, cleanup in finally
- Dockerfile: use uvicorn[standard] for websockets support

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 14:10:27 +02:00
Ethanfel 2200da491f fix: address review bugs in server implementation
- Fix keyframe 6-tuple → 4-tuple mismatch crashing ExportRunner
- Fix ws.broadcast() using wrong event loop from background threads
- Fix export counter hardcoded to 1, now auto-increments
- Add path traversal protection to file/stream/delete endpoints
- Use proper HTTP error codes (was returning 200 for errors)
- Add thread safety to WebSocket connection list
- Record exports to DB so markers appear
- Move WS endpoint to /ws/export (was /api/ws/export)
- Prune dead threads from cache job tracker

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 13:55:25 +02:00
Ethanfel 6a4ac8b8ed feat: add hidden files API endpoints
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 13:49:30 +02:00
Ethanfel 1f6906c946 feat: add export endpoint with WebSocket progress
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 13:49:16 +02:00
Ethanfel dfba88a601 feat: add markers/profiles/labels API endpoints
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 13:48:33 +02:00
Ethanfel e94c088df0 feat: add video streaming with transcode cache and audio extraction
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 13:48:06 +02:00
Ethanfel 9569103edd feat: add FastAPI app with file listing endpoint
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 13:47:23 +02:00
Ethanfel 079afeee7c feat: create server/config with env var settings and quality presets
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 13:44:31 +02:00