add stop_before_end and offline_tail to pad_to_next (#2359)
This commit is contained in:
@@ -64,6 +64,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Add *experimental* `Scripted Schedule` playout system
|
||||
- This system uses python scripts to support the highest degree of customization
|
||||
- The goal is to expose methods equivalent to all sequential schedule (YAML) instructions
|
||||
- YAML and Scripted schedules: add `offline_tail` and `stop_before_end` to `pad_to_next` instruction
|
||||
- Both parameters default to `true`
|
||||
|
||||
### Fix
|
||||
- Fix database operations that were slowing down playout builds
|
||||
|
||||
@@ -84,6 +84,8 @@ public interface ISchedulingEngine
|
||||
string fallback,
|
||||
bool trim,
|
||||
int discardAttempts,
|
||||
bool stopBeforeEnd,
|
||||
bool offlineTail,
|
||||
Option<FillerKind> maybeFillerKind,
|
||||
string customTitle,
|
||||
bool disableWatermarks);
|
||||
|
||||
@@ -465,6 +465,8 @@ public class SchedulingEngine(
|
||||
string fallback,
|
||||
bool trim,
|
||||
int discardAttempts,
|
||||
bool stopBeforeEnd,
|
||||
bool offlineTail,
|
||||
Option<FillerKind> maybeFillerKind,
|
||||
string customTitle,
|
||||
bool disableWatermarks)
|
||||
@@ -505,10 +507,10 @@ public class SchedulingEngine(
|
||||
|
||||
_state.CurrentTime = AddDurationInternal(
|
||||
targetTime,
|
||||
stopBeforeEnd: true,
|
||||
stopBeforeEnd,
|
||||
discardAttempts,
|
||||
trim,
|
||||
offlineTail: true,
|
||||
offlineTail,
|
||||
GetFillerKind(maybeFillerKind),
|
||||
customTitle,
|
||||
disableWatermarks,
|
||||
|
||||
@@ -108,6 +108,8 @@ public class PlayoutModule(ISchedulingEngine schedulingEngine, CancellationToken
|
||||
string fallback = null,
|
||||
bool trim = false,
|
||||
int discard_attempts = 0,
|
||||
bool stop_before_end = true,
|
||||
bool offline_tail = true,
|
||||
string filler_kind = null,
|
||||
string custom_title = null,
|
||||
bool disable_watermarks = false)
|
||||
@@ -124,6 +126,8 @@ public class PlayoutModule(ISchedulingEngine schedulingEngine, CancellationToken
|
||||
fallback,
|
||||
trim,
|
||||
discard_attempts,
|
||||
stop_before_end,
|
||||
offline_tail,
|
||||
maybeFillerKind,
|
||||
custom_title,
|
||||
disable_watermarks);
|
||||
|
||||
@@ -60,10 +60,10 @@ public class YamlPlayoutPadToNextHandler(EnumeratorCache enumeratorCache) : Yaml
|
||||
padToNext.Content,
|
||||
padToNext.Fallback,
|
||||
targetTime,
|
||||
stopBeforeEnd: true,
|
||||
padToNext.StopBeforeEnd,
|
||||
padToNext.DiscardAttempts,
|
||||
padToNext.Trim,
|
||||
true,
|
||||
padToNext.OfflineTail,
|
||||
GetFillerKind(padToNext, context),
|
||||
padToNext.CustomTitle,
|
||||
padToNext.DisableWatermarks,
|
||||
|
||||
@@ -9,8 +9,14 @@ public class YamlPlayoutPadToNextInstruction : YamlPlayoutInstruction
|
||||
|
||||
public bool Trim { get; set; }
|
||||
|
||||
[YamlMember(Alias = "offline_tail", ApplyNamingConventions = false)]
|
||||
public bool OfflineTail { get; set; } = true;
|
||||
|
||||
public string Fallback { get; set; }
|
||||
|
||||
[YamlMember(Alias = "discard_attempts", ApplyNamingConventions = false)]
|
||||
public int DiscardAttempts { get; set; }
|
||||
|
||||
[YamlMember(Alias = "stop_before_end", ApplyNamingConventions = false)]
|
||||
public bool StopBeforeEnd { get; set; } = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user