soulsync/core/video/enrichment
BoulderBadgeDad d0c8aa9338 video: OMDb worker survives a bad/expired API key gracefully
The log flood you saw was the OMDb worker hitting a 401 (invalid key) on every
owned title: it logged a full traceback per item AND marked each one
ratings_synced=1 — which would've stopped them ever retrying once the key was
fixed. Root-cause fixes:

- OMDBClient.ratings raises a distinct OMDbAuthError on 401 / 'Invalid API key!'
  (vs a transient error vs a genuine no-data 200).
- Worker: on an auth error it PAUSES (transient, not persisted) with a reason
  note + one warning, instead of churning the whole library; the item is NOT
  marked synced. Transient errors no longer burn items either — they back off and
  pause after 3 in a row. Only a genuine 'no data' marks an item synced. Warnings
  are concise (no per-item tracebacks). get_stats exposes the pause 'note'.
- Fixing the key auto-recovers: saving a new/changed OMDb key re-queues every
  still-unrated title (resets the wrongly-burned ones), and the engine rebuild
  un-pauses the worker.

Seam tests: bad-key pause-without-burn, transient keep-item, ratings() raises on
401, key-change re-queues unrated. 227 video-suite tests pass.
2026-06-15 09:20:00 -07:00
..
__init__.py video enrichment 1b: worker engine + TMDB/TVDB clients 2026-06-14 11:21:30 -07:00
clients.py video: OMDb worker survives a bad/expired API key gracefully 2026-06-15 09:20:00 -07:00
engine.py video: Where to Watch — play-on-your-server tile + clickable providers 2026-06-15 08:49:35 -07:00
worker.py video: OMDb worker survives a bad/expired API key gracefully 2026-06-15 09:20:00 -07:00