From 0900850fc039514863aae7ae853e5a8eee83fe77 Mon Sep 17 00:00:00 2001 From: SherlockHolmas <634611198@qq.com> Date: Sat, 14 Oct 2023 16:46:06 +0800 Subject: [PATCH] for some reason, the official has changed some streamer live request. today, I found that minite-event parameters required was more. so I add it. In the live streaming rooms of games DeadByNight and OW2, for example, three additional parameters are required. (live, channel, game_id) --- TwitchChannelPointsMiner/classes/Twitch.py | 4 ++++ TwitchChannelPointsMiner/classes/entities/Stream.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/TwitchChannelPointsMiner/classes/Twitch.py b/TwitchChannelPointsMiner/classes/Twitch.py index 1468520..1d7b1f4 100644 --- a/TwitchChannelPointsMiner/classes/Twitch.py +++ b/TwitchChannelPointsMiner/classes/Twitch.py @@ -108,13 +108,17 @@ class Twitch(object): "broadcast_id": streamer.stream.broadcast_id, "player": "site", "user_id": self.twitch_login.get_user_id(), + "live": True, + "channel": streamer.username } if ( streamer.stream.game_name() is not None + and streamer.stream.game_id() is not None and streamer.settings.claim_drops is True ): event_properties["game"] = streamer.stream.game_name() + event_properties["game_id"] = streamer.stream.game_id() # Update also the campaigns_ids so we are sure to tracking the correct campaign streamer.stream.campaigns_ids = ( self.__get_campaign_ids_from_streamer(streamer) diff --git a/TwitchChannelPointsMiner/classes/entities/Stream.py b/TwitchChannelPointsMiner/classes/entities/Stream.py index 0991b36..50ffc79 100644 --- a/TwitchChannelPointsMiner/classes/entities/Stream.py +++ b/TwitchChannelPointsMiner/classes/entities/Stream.py @@ -84,6 +84,9 @@ class Stream(object): def game_name(self): return None if self.game in [{}, None] else self.game["name"] + + def game_id(self): + return None if self.game in [{}, None] else self.game["id"] def update_required(self): return self.__last_update == 0 or self.update_elapsed() >= 120