soulsync/core/video
BoulderBadgeDad 9e845e760e Smart post-download scan: skip the crawl when the server already has the grab (phase 3)
Scanning is expensive and most servers auto-ingest new files, so a full crawl after
every download is usually wasted. Stage 1 now probes per library: take the newest
completed grab of that type from download history and ask the server (cheap targeted
search) whether it already has it. If yes, the server auto-picked it up (and the
earlier ones) → skip that library's crawl + poll entirely. Only libraries the server
is missing get rescanned. Always emits so stage 2 still reads the new items in.

- sources: PlexVideoSource.has_item / JellyfinVideoSource.has_item (match movie by
  title+year, episode by show+SxE) + video_server_has_item() — conservative, any
  uncertainty → False so we scan.
- handler: per-scope skip decision fed by latest_completed + server_has_item seams;
  narrows the scan scope to only the missing libraries; toggle skip_if_present
  (default on). Returns scanned/skipped for visibility.

Seam tests: skip-both, scan-only-missing, no-history, toggle-off, probe-error→scan;
Plex has_item match tests.
2026-06-21 14:20:49 -07:00
..
enrichment Video downloads: best-in-class post-process pipeline 2026-06-21 01:44:35 -07:00
__init__.py video side: library scanner (server = source of truth) + scan API 2026-06-13 23:13:50 -07:00
download_config.py video downloads: reword download_config docstring (a wrapped line started with 'from the music side' — tripped the core/video no-music-import guard, a test false positive) 2026-06-19 00:25:57 -07:00
download_events.py video automations: post-download scan chain (parity with music's batch→scan→update) 2026-06-20 14:47:00 -07:00
download_monitor.py Video download history: permanent archive snapshotted at terminal status (phase 1) 2026-06-21 14:10:22 -07:00
download_pipeline.py video downloads pipeline: data + pure logic foundation 2026-06-19 14:50:27 -07:00
importer.py Video downloads: best-in-class post-process pipeline 2026-06-21 01:44:35 -07:00
library_paths.py Video downloads: best-in-class post-process pipeline 2026-06-21 01:44:35 -07:00
mediainfo.py Video downloads: best-in-class post-process pipeline 2026-06-21 01:44:35 -07:00
mock_search.py video search: each source returns its own results (was identical) 2026-06-19 13:56:04 -07:00
organization.py Video downloads: best-in-class post-process pipeline 2026-06-21 01:44:35 -07:00
quality_eval.py Video quality: recognize plain WEB + accept resolution-only releases 2026-06-21 02:11:40 -07:00
quality_profile.py video quality profile: loose resolution cutoff + movie/episode size split 2026-06-19 10:40:53 -07:00
release_parse.py Video quality: recognize plain WEB + accept resolution-only releases 2026-06-21 02:11:40 -07:00
retry.py video downloads Phase C: auto-retry + alternate-query requery 2026-06-19 17:12:44 -07:00
scanner.py Video: two system deep-scan automations (Movie + TV), independently scoped 2026-06-21 12:14:46 -07:00
sidecars.py Video downloads: best-in-class post-process pipeline 2026-06-21 01:44:35 -07:00
slskd_download.py video downloads Phase A: cancelled state, cancel/retry, monitor robustness 2026-06-19 15:31:51 -07:00
slskd_search.py video search: poll the FULL slskd timeout (~60s) + explain audio-only results 2026-06-19 16:55:53 -07:00
sources.py Smart post-download scan: skip the crawl when the server already has the grab (phase 3) 2026-06-21 14:20:49 -07:00
subtitles.py Video downloads: best-in-class post-process pipeline 2026-06-21 01:44:35 -07:00
youtube.py Playlist/channel extraction: stop pinning a static user_agent for yt-dlp 2026-06-17 22:21:12 -07:00
youtube_enrichment.py Remember each channel: cache the video catalog + metadata (instant re-open) 2026-06-17 18:08:04 -07:00
youtube_quality.py video downloads: separate YouTube quality profile (yt-dlp) 2026-06-19 10:45:38 -07:00