fix jellyfin and emby links (#320)

This commit is contained in:
Jason Dove
2021-07-27 18:26:12 -05:00
committed by GitHub
parent c39654ca40
commit cd2558e3e6
5 changed files with 16 additions and 6 deletions
+9 -2
View File
@@ -403,8 +403,15 @@ namespace ErsatzTV.Core.Scheduling
// remove any items outside the desired range
playout.Items.RemoveAll(old => old.FinishOffset < playoutStart || old.StartOffset > playoutFinish);
DateTimeOffset maxStartTime = playout.Items.Max(i => i.FinishOffset);
DateTimeOffset minCurrentTime = maxStartTime < currentTime ? maxStartTime : currentTime;
DateTimeOffset minCurrentTime = currentTime;
if (playout.Items.Any())
{
DateTimeOffset maxStartTime = playout.Items.Max(i => i.FinishOffset);
if (maxStartTime < currentTime)
{
minCurrentTime = maxStartTime;
}
}
playout.Anchor = new PlayoutAnchor
{