Skip to content

Commit

Permalink
- Adding extra checks around Twitch Upcoming Ad trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
SaviorXTanren committed Jan 26, 2024
1 parent 7119d28 commit a7b7da5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MixItUp.Base/Services/Twitch/TwitchSessionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,11 @@ public async Task RefreshChannel()

if (this.AdSchedule != null)
{
DateTimeOffset nextAd = adSchedule.NextAdTimestamp();
DateTimeOffset nextAd = this.AdSchedule.NextAdTimestamp();
if (nextAd > this.NextAdTimestamp)
{
int nextAdMinutes = this.AdSchedule.NextAdMinutesFromNow();
if (nextAdMinutes <= ChannelSession.Settings.TwitchUpcomingAdCommandTriggerAmount)
if (nextAdMinutes <= ChannelSession.Settings.TwitchUpcomingAdCommandTriggerAmount && nextAdMinutes > 0)
{
this.NextAdTimestamp = nextAd;

Expand Down

0 comments on commit a7b7da5

Please sign in to comment.