Skip to content

Commit

Permalink
for some reason,
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
LeftMonster committed Oct 14, 2023
1 parent a895889 commit 13817a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions TwitchChannelPointsMiner/classes/Twitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,17 @@ def update_stream(self, streamer):
"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)
Expand Down
3 changes: 3 additions & 0 deletions TwitchChannelPointsMiner/classes/entities/Stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ def __str_game(self):

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
Expand Down

0 comments on commit 13817a2

Please sign in to comment.