Schedule upcoming streams at their start time; fix is_upcoming check
yt-dlp reports scheduled premieres as live_status 'is_upcoming' (not 'upcoming'), and exposes release_timestamp with the stream's scheduled start time. For an upcoming stream with a known start, reschedule the job at start+2min without touching the wait counter, no matter how far away the start is — the bounded 10-minute wait clock (maxLiveWaits, ~4h) now only applies while a stream is actually running. Upcoming streams with an unknown start time keep the 10-minute wait behavior.
This commit is contained in:
+1
-1
@@ -32,7 +32,7 @@ type Job struct {
|
||||
MaxRetries int `json:"max_retries"`
|
||||
NextAttemptAt *time.Time `json:"next_attempt_at,omitempty"` // nil means ready now
|
||||
Error string `json:"error,omitempty"`
|
||||
Duration float64 `json:"duration,omitempty"` // expected media duration in seconds (YouTube)
|
||||
Duration float64 `json:"duration,omitempty"` // expected media duration in seconds (YouTube)
|
||||
LiveWaitCount int `json:"live_wait_count,omitempty"` // consecutive 10-min waits while a video is still live (does not count against AttemptCount)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user