Commit Graph
1 Commits
Author SHA1 Message Date
Divarion_D c4ec65217c feat(vod): run Movies/Series imports as one bounded batch
An M3U can list tens of thousands of items, and the import started one
background vod_import_item per item from the web request: that many
processes and TMDb requests at once.

The request now writes the items to a batch file (one JSON payload per
line) and starts a single `vod_import_batch`, which feeds them through
Multithread::pool(): at most thread_count imports at a time, commands
read from the file only as slots free up, output discarded, polled every
100 ms. The payload no longer carries the whole genre map; the importer
reads it from core. The batch writes a .wpid, so Kill Running stops it.

thread_count (parallel imports) moves to Settings -> VOD Import, since
core now uses it; VodItemImporter::importThreads() is the one reader for
the import and the watch module's scans. saveGenreMap is simplified.

Multithread::pool() is new beside the existing run(), which holds every
command up front, spins without sleeping and keeps each finished process'
pipes open; the watch cron moves to pool() too.
2026-10-03 23:02:35 +03:00