Balance and refresh South Park commercial breaks

This commit is contained in:
Josh
2026-11-13 17:11:11 -05:00
parent 160f74c294
commit 9978d3bb08
2 changed files with 175 additions and 0 deletions

View File

@@ -19,6 +19,10 @@ Place commercial clips in `data/commercials/`. Compose mounts that folder read-o
Scan the source after adding clips, then create a **Commercials** filler list under **Library → Fillers**. For breaks between episodes, assign the list as **Post** filler in a slot schedule. For breaks during episodes, assign it as **Mid** filler and set the break timing. Channel-level Flex uses filler only when the lineup contains Flex time.
On this host, channel 3 uses `scripts/south-park-commercials.py` from the user's crontab every minute. The script scans changed files after their sizes and modification times stabilize and applies the refreshed lineup when channel 3 has no active session. It uses one clip of at least 60 seconds between episodes and two clips of at most 30 seconds at the 25%, 50%, and 75% marks. Each duration group uses shuffled rounds with equal play counts to within one per lineup cycle. Clips longer than 30 seconds and shorter than 60 seconds are outside both groups.
The script reads the original ordered episode lineup from `data/south-park-commercials/episodes.json`, which is local deployment state. Run `python3 scripts/south-park-commercials.py --apply-active` for an immediate update that can restart channel 3 if the indexed library has changed.
YouTube watch links use YouTube's web player. To put videos in a retroLabs channel, obtain playable files from the creator or another authorized download source and add them to a Tunarr **Other Videos** library. Keep a separate library for clips intended as regular programming.
## Start the stack on another checkout