soulsync/api/video
BoulderBadgeDad 40149d09f7 video automations: 'Scan Video Library' — the first video twin (shared engine)
The video side gets its OWN automations at music-side parity, kept separate so
nothing on the music side breaks. First twin: Scan Video Library — tells the media
server to rescan the user's SELECTED video sections (movies/TV, never music), then
reads the result into video.db so freshly-downloaded media shows as owned.

Architecture (scope tags + video twins on the shared engine):
- Handler core/automation/handlers/video_scan_library.py — pure function with
  injected I/O (server_refresh / run_video_scan); production lazily binds
  refresh_video_server_sections() + the video scanner. Owns its own progress.
  Lives on the SHARED automation side so it may import core.video (isolation only
  forbids core/video & api/video from importing music, not the reverse).
- blocks.py gains a 'scope' tag ('both' generic / 'video' video-only / absent=music)
  + blocks_for_scope(). The music /api/automations/blocks now filters out video
  blocks; new isolated /api/video/automations/blocks serves the video palette.
- automation_engine seeds 'Scan Video Library' (owned_by='video', schedule 6h) so
  it appears ONLY on the video Automations page; ensure_system_automations now
  honours owned_by + action_config. Music page excludes owned_by='video' rows.

kettui: seam-level tests for every handler path (happy/no-server/scan-error/never-
raises/mode), scope filtering (music excludes video, video gets generics, music
parity preserved), seeding (owned_by + mode), registration drift guard. 39 new
tests; full automation suite (288) + isolation guards green.
2026-06-19 19:38:18 -07:00
..
__init__.py video automations: 'Scan Video Library' — the first video twin (shared engine) 2026-06-19 19:38:18 -07:00
automations.py video automations: 'Scan Video Library' — the first video twin (shared engine) 2026-06-19 19:38:18 -07:00
calendar.py Video Calendar: week navigation + owned/missing filter 2026-06-15 19:32:57 -07:00
dashboard.py Video: scope library reads to the active server (Plex/Jellyfin don't commingle) 2026-06-15 18:45:28 -07:00
detail.py video: episode detail expand (guest stars + bigger still) 2026-06-15 13:20:15 -07:00
discover.py Discover: streaming-provider filter + infinite scroll + a11y polish 2026-06-16 14:55:13 -07:00
downloads.py video downloads Phase C: auto-retry + alternate-query requery 2026-06-19 17:12:44 -07:00
enrichment.py video enrichment: add Wikidata (official website link) — full parity, completes the batch 2026-06-18 23:13:22 -07:00
libraries.py Video side: own server connection (Plex/Jellyfin), music-style picker, isolated 2026-06-15 16:42:22 -07:00
library.py Video: scope library reads to the active server (Plex/Jellyfin don't commingle) 2026-06-15 18:45:28 -07:00
poster.py Search avatars: proxy with a UA + graceful initials fallback 2026-06-17 09:57:42 -07:00
scan.py video Tools: match music Database Updater (stats, cancel, real progress) 2026-06-14 07:35:57 -07:00
search.py video: smart multi-layer back button + next-level search/person 2026-06-15 08:30:17 -07:00
watchlist.py Video watchlist: richer show cards (status pill + ep count) + sort dropdown 2026-06-16 10:19:13 -07:00
wishlist.py Wishlist: episode synopsis + clickable cards + FIFO/newest sort 2026-06-16 18:21:26 -07:00
youtube.py video enrichment: add DeArrow (crowd-sourced YouTube titles) — full parity 2026-06-18 23:09:02 -07:00