fix automatic playout reset (#999)
This commit is contained in:
@@ -9,6 +9,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
- This only happened with fixed start schedule items following a schedule item with tail or fallback filler
|
- This only happened with fixed start schedule items following a schedule item with tail or fallback filler
|
||||||
- Fix NFO reader bug that caused inaccurate warning messages about invalid XML and incomplete metadata
|
- Fix NFO reader bug that caused inaccurate warning messages about invalid XML and incomplete metadata
|
||||||
- Fix reverse proxy SSL termination support by supporting `X-Forwarded-Proto` header
|
- Fix reverse proxy SSL termination support by supporting `X-Forwarded-Proto` header
|
||||||
|
- Fix automatic playout reset scheduling
|
||||||
|
- Playouts would reset every 30 minutes between midnight and the configured time, instead of only at the configured time
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Add music video credits template system
|
- Add music video credits template system
|
||||||
|
|||||||
@@ -138,8 +138,10 @@ public class SchedulerService : BackgroundService
|
|||||||
|
|
||||||
foreach (Playout playout in playouts.OrderBy(p => decimal.Parse(p.Channel.Number)))
|
foreach (Playout playout in playouts.OrderBy(p => decimal.Parse(p.Channel.Number)))
|
||||||
{
|
{
|
||||||
if (DateTime.Now.Subtract(DateTime.Today.Add(playout.DailyRebuildTime ?? TimeSpan.FromDays(7))) <
|
DateTime now = DateTime.Now;
|
||||||
TimeSpan.FromMinutes(5))
|
DateTime target = DateTime.Today.Add(playout.DailyRebuildTime ?? TimeSpan.FromDays(7));
|
||||||
|
// check absolute diff
|
||||||
|
if (now.Subtract(target).Duration() < TimeSpan.FromMinutes(5))
|
||||||
{
|
{
|
||||||
await _workerChannel.WriteAsync(
|
await _workerChannel.WriteAsync(
|
||||||
new BuildPlayout(playout.Id, PlayoutBuildMode.Reset),
|
new BuildPlayout(playout.Id, PlayoutBuildMode.Reset),
|
||||||
|
|||||||
Reference in New Issue
Block a user