add scripted control instructions (#2341)

* add start_epg_group, stop_epg_group

* fix imports

* add graphics_on, graphics_off

* add skip_items

* add skip_to_item

* add watermark_on, watermark_off
This commit is contained in:
Jason Dove
2025-08-24 16:14:43 +00:00
committed by GitHub
parent 4e2310d008
commit 605c57bef3
4 changed files with 325 additions and 21 deletions
@@ -50,6 +50,14 @@ public class ScriptedPlayoutBuilder(
var engine = Python.CreateEngine();
var scope = engine.CreateScope();
string scriptPath = Path.GetDirectoryName(playout.ScheduleFile);
if (!string.IsNullOrWhiteSpace(scriptPath) && localFileSystem.FolderExists(scriptPath))
{
ICollection<string> paths = engine.GetSearchPaths();
paths.Add(scriptPath);
engine.SetSearchPaths(paths);
}
var sys = engine.GetSysModule();
var modules = (PythonDictionary)sys.GetVariable("modules");