soulsync/api
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
..
video video automations: 'Scan Video Library' — the first video twin (shared engine) 2026-06-19 19:38:18 -07:00
__init__.py fix: add periodic cleanup timer for api/request in-memory store 2026-04-19 15:22:25 -07:00
auth.py fix: throttle auth last_used_at config writes 2026-04-19 15:22:24 -07:00
cache.py enrich SoulSync API and update the DOCS 2026-03-04 13:42:47 -08:00
discover.py enrich SoulSync API and update the DOCS 2026-03-04 13:42:47 -08:00
downloads.py diag: log every cancel_download caller with a trigger label 2026-05-19 22:31:29 -07:00
helpers.py Enrich the SoulSync API 2026-03-04 13:19:39 -08:00
library.py fix: eliminate double-query in track search 2026-04-19 15:22:24 -07:00
listenbrainz.py Full automation engine expansion with scheduling, triggers, actions, and UI polish 2026-03-05 15:13:32 -08:00
playlists.py Fix ruff F541 and B007 lint errors 2026-04-21 11:18:40 -07:00
profiles.py enrich SoulSync API and update the DOCS 2026-03-04 13:42:47 -08:00
request.py Cin-6: Rename soulseek_client global → download_orchestrator 2026-05-04 23:23:32 -07:00
retag.py enrich SoulSync API and update the DOCS 2026-03-04 13:42:47 -08:00
search.py Add module logger + surface silent exceptions in 7 logger-less files — 12 sites 2026-05-07 10:27:04 -07:00
serializers.py Add MusicBrainz as a metadata source 2026-05-18 18:47:13 -07:00
settings.py Encrypt sensitive config values at rest with Fernet — transparent migration, zero breaking changes 2026-03-12 09:25:25 -07:00
system.py Add module logger + surface silent exceptions in 7 logger-less files — 12 sites 2026-05-07 10:27:04 -07:00
watchlist.py Enrich the SoulSync API 2026-03-04 13:19:39 -08:00
wishlist.py Make wishlist respect configured providers 2026-04-30 07:41:22 +03:00