From 82b6d5919408f683d5ac7d002f63377e432e257b Mon Sep 17 00:00:00 2001 From: DevilXD Date: Mon, 14 Feb 2022 18:25:12 +0100 Subject: [PATCH] Fix incorrect stream state subscribtion topic --- constants.py | 13 ++++++------- twitch.py | 2 ++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/constants.py b/constants.py index 806df62..74b4368 100644 --- a/constants.py +++ b/constants.py @@ -214,16 +214,15 @@ class WebsocketTopic: WEBSOCKET_TOPICS: Dict[str, Dict[str, str]] = { "User": { # Using user_id "Drops": "user-drop-events", - "StreamState": "stream-change-v1", "CommunityPoints": "community-points-user-v1", - "Presence": "presence", - "Notifications": "onsite-notifications", + "Presence": "presence", # unused + "Notifications": "onsite-notifications", # unused }, "Channel": { # Using channel_id - "Drops": "channel-drop-events", - "StreamState": "stream-change-by-channel", - "CommunityPoints": "community-points-channel-v1", - "VideoPlayback": "video-playback-by-id", + "Drops": "channel-drop-events", # unused + "CommunityPoints": "community-points-channel-v1", # unused + "StreamState": "video-playback-by-id", + # currently unused, can be used to receive updates regarding stream's title and tag changes "StreamUpdate": "broadcast-settings-update", }, } diff --git a/twitch.py b/twitch.py index 27318ab..3a48cf1 100644 --- a/twitch.py +++ b/twitch.py @@ -488,6 +488,8 @@ class Twitch: channel.viewers = viewers channel.display() # logger.debug(f"{channel.name} viewers: {viewers}") + else: + logger.warning(f"Unknown stream state: {msg_type}") def on_online(self, channel: Channel): """