From ba0d8303c67869e174093e23053e9bfad015c89c Mon Sep 17 00:00:00 2001 From: Zack Williamson Date: Fri, 22 Mar 2024 17:12:14 -0400 Subject: [PATCH] fix(events): fix upcoming ad break event timing --- src/backend/twitch-api/ad-manager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/twitch-api/ad-manager.ts b/src/backend/twitch-api/ad-manager.ts index df47ad207..ac67c4389 100644 --- a/src/backend/twitch-api/ad-manager.ts +++ b/src/backend/twitch-api/ad-manager.ts @@ -71,7 +71,7 @@ class AdManager { */ let timeout = 1; if (minutesUntilNextAdBreak > upcomingTriggerMinutes) { - timeout = this.secondsUntilNextAdBreak * 1000; + timeout = (this.secondsUntilNextAdBreak - (upcomingTriggerMinutes * 60)) * 1000; } setTimeout(() => {