siftlode/backend/app/sync
npeter83 c4aecf9f77 feat(maintenance): scheduled job to retire unplayable videos
Add a daily maintenance/validation job that detects videos which can't be played
anywhere and retires them safely. Two phases: re-check already-flagged videos
(recover if available again, else hard-delete once the grace period elapses,
cascading to states/playlist items), and a rolling re-validation of the
least-recently-checked currently-available videos that flags newly-unplayable
ones (hidden from the feed immediately via unavailable_since).

Detection is ~free: a video missing from the videos.list response is
deleted-or-private; an `upcoming` premiere >2 days past its scheduled start that
never went live is abandoned. A still-live broadcast is kept (legit 24/7 stream).
Enrichment now also fetches part=status to populate the status columns. Grace is
7 days for removed videos, none for abandoned. Before deleting, affected users
get one batched notification (never per-video). Interval is admin-tunable via the
Scheduler dashboard; batch size and grace are config. Quota-attributed to the
system and bounded by the same backfill reserve as the other jobs.
2026-06-18 03:20:28 +02:00
..
__init__.py feat: M2 (part 1) — subscription import, YouTube client, quota guard 2026-06-11 01:22:07 +02:00
autotag.py chore: structured timestamped logging across the backend 2026-06-11 04:26:18 +02:00
maintenance.py feat(maintenance): scheduled job to retire unplayable videos 2026-06-18 03:20:28 +02:00
playlists.py fix(playlists): dirty lagged one edit (flush before fingerprinting) 2026-06-16 00:11:58 +02:00
runner.py fix(sync): re-enrich live videos so ended streams gain duration 2026-06-16 10:06:58 +02:00
subscriptions.py chore: structured timestamped logging across the backend 2026-06-11 04:26:18 +02:00
videos.py feat(maintenance): scheduled job to retire unplayable videos 2026-06-18 03:20:28 +02:00