Skip to content

Commit

Permalink
fix(events): fix upcoming ad break event timing
Browse files Browse the repository at this point in the history
  • Loading branch information
zunderscore committed Mar 22, 2024
1 parent db740b3 commit ba0d830
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/twitch-api/ad-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class AdManager {
*/
let timeout = 1;
if (minutesUntilNextAdBreak > upcomingTriggerMinutes) {
timeout = this.secondsUntilNextAdBreak * 1000;
timeout = (this.secondsUntilNextAdBreak - (upcomingTriggerMinutes * 60)) * 1000;
}

setTimeout(() => {
Expand Down

0 comments on commit ba0d830

Please sign in to comment.