Keep projects distinct within each commercial break

This commit is contained in:
Josh
2026-11-13 17:32:45 -05:00
parent 19c0751a4a
commit 183c96fbff
2 changed files with 39 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ 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, channels 1–11 use `scripts/channel-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 each channel 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.
On this host, channels 1–11 use `scripts/channel-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 each channel 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 when the project mix allows it. Name ads with a shared project prefix before the first hyphen, such as `burnengine-teaser.mp4`. The scheduler pairs different prefixes and uses a single-clip break when there are too few eligible clips from other projects. Clips longer than 30 seconds and shorter than 60 seconds are outside both groups.
The script reads the original ordered episode lineups from `data/channel-commercials/`, which is local deployment state. Run `python3 scripts/channel-commercials.py --apply-active` for an immediate update that can restart affected channels if the indexed library has changed.