diff --git a/manifest.json b/manifest.json index 547353f..0909107 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { - "version": "1.5.0", + "version": "1.5.1", "thumbnail": "store/thumbnail.png", "id": "com_imdevinc_StreamControllerTwitchPlugin", "name": "Twitch Integration", diff --git a/twitch_backend.py b/twitch_backend.py index 7924562..a00bfd5 100644 --- a/twitch_backend.py +++ b/twitch_backend.py @@ -3,7 +3,7 @@ from urllib.parse import urlparse, parse_qs, urlencode import threading import requests -from datetime import datetime +from datetime import datetime, timedelta from loguru import logger as log from twitchpy.client import Client @@ -143,7 +143,7 @@ def play_ad(self, length: int) -> None: def get_next_ad(self) -> tuple[datetime, int]: if not self.twitch: - return "Not Live" + return datetime.now() - timedelta(minutes=1), -1 self.validate_auth() schedule = self.twitch.get_ad_schedule(self.user_id) return schedule.next_ad_at, schedule.snooze_count