|
|
@ -28,6 +28,12 @@ public class YamlPlayoutDurationHandler(EnumeratorCache enumeratorCache) : YamlP |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (duration.StopBeforeEnd == false && duration.OfflineTail) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
logger.LogError("offline_tail must be false when stop_before_end is false"); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
DateTimeOffset targetTime = context.CurrentTime.Add(timeSpan); |
|
|
|
DateTimeOffset targetTime = context.CurrentTime.Add(timeSpan); |
|
|
|
|
|
|
|
|
|
|
|
Option<IMediaCollectionEnumerator> maybeEnumerator = await GetContentEnumerator( |
|
|
|
Option<IMediaCollectionEnumerator> maybeEnumerator = await GetContentEnumerator( |
|
|
@ -49,6 +55,7 @@ public class YamlPlayoutDurationHandler(EnumeratorCache enumeratorCache) : YamlP |
|
|
|
instruction.Content, |
|
|
|
instruction.Content, |
|
|
|
duration.Fallback, |
|
|
|
duration.Fallback, |
|
|
|
targetTime, |
|
|
|
targetTime, |
|
|
|
|
|
|
|
duration.StopBeforeEnd, |
|
|
|
duration.DiscardAttempts, |
|
|
|
duration.DiscardAttempts, |
|
|
|
duration.Trim, |
|
|
|
duration.Trim, |
|
|
|
duration.OfflineTail, |
|
|
|
duration.OfflineTail, |
|
|
@ -68,6 +75,7 @@ public class YamlPlayoutDurationHandler(EnumeratorCache enumeratorCache) : YamlP |
|
|
|
string contentKey, |
|
|
|
string contentKey, |
|
|
|
string fallbackContentKey, |
|
|
|
string fallbackContentKey, |
|
|
|
DateTimeOffset targetTime, |
|
|
|
DateTimeOffset targetTime, |
|
|
|
|
|
|
|
bool stopBeforeEnd, |
|
|
|
int discardAttempts, |
|
|
|
int discardAttempts, |
|
|
|
bool trim, |
|
|
|
bool trim, |
|
|
|
bool offlineTail, |
|
|
|
bool offlineTail, |
|
|
@ -97,7 +105,7 @@ public class YamlPlayoutDurationHandler(EnumeratorCache enumeratorCache) : YamlP |
|
|
|
//DisableWatermarks = !allowWatermarks
|
|
|
|
//DisableWatermarks = !allowWatermarks
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
if (remainingToFill - itemDuration >= TimeSpan.Zero) |
|
|
|
if (remainingToFill - itemDuration >= TimeSpan.Zero || !stopBeforeEnd) |
|
|
|
{ |
|
|
|
{ |
|
|
|
context.Playout.Items.Add(playoutItem); |
|
|
|
context.Playout.Items.Add(playoutItem); |
|
|
|
context.AdvanceGuideGroup(); |
|
|
|
context.AdvanceGuideGroup(); |
|
|
@ -195,6 +203,11 @@ public class YamlPlayoutDurationHandler(EnumeratorCache enumeratorCache) : YamlP |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!stopBeforeEnd) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return context.CurrentTime; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return offlineTail ? targetTime : context.CurrentTime; |
|
|
|
return offlineTail ? targetTime : context.CurrentTime; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|