Reads the active media server and mirrors it into video.db, adapting the music scan pattern (ask the server, upsert, prune what's gone) — isolated from music. - core/video/scanner.py: server-agnostic VideoLibraryScanner. Consumes a media source (duck-typed) yielding normalized dicts; upserts movies + show trees, prunes removed items, reports progress/state. Skips pruning when a scan returns nothing (transient-failure safety). Background thread + scan_sync. - core/video/sources.py: Plex + Jellyfin adapters that REUSE the shared connected clients (MediaServerEngine) but own all video-section logic; produce normalized dicts. (Validated against a live server by design; scanner itself is fully unit-tested with a fake source.) - api/video/scan.py: POST /api/video/scan/request, GET /api/video/scan/status. - .gitignore: video_library.db + sidecars (mirrors music); tests inject a tmp DB so none is ever created in the repo. Tests: scan populate/prune/empty-safety/no-source-error, isolation guard (core/video imports nothing from music), scan routes registered. 101 green.
5 lines
196 B
Python
5 lines
196 B
Python
"""SoulSync — isolated VIDEO core package.
|
|
|
|
Holds the video library scanner and media-server adapters. Music never imports
|
|
this package; this package never imports the music database layer.
|
|
"""
|