Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

Commit b0a62fd

Browse files
committed
handle event data that should be number coming as string some times
1 parent e25f99b commit b0a62fd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Source/StreamlabsEvent.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def PopulateNormalisedData(self):
131131
self.valueType = "money"
132132
subPlan = self.rawMessage["sub_plan"]
133133
subValue = StreamlabsEventUtils.GetTwitchSubscriptionValue(subPlan)
134-
amount = self.rawMessage["amount"]
134+
amount = float(self.rawMessage["amount"])
135135
if subValue != None:
136136
self.value = subValue * amount
137137
else:
@@ -150,10 +150,10 @@ def PopulateNormalisedData(self):
150150
self.value = 1
151151
elif (self.handlerName == "twitch_account-host" or self.handlerName == "mixer_account-host"):
152152
self.valueType = "viewer"
153-
self.value = self.rawMessage["viewers"]
153+
self.value = int(self.rawMessage["viewers"])
154154
elif (self.handlerName == "twitch_account-raid"):
155155
self.valueType = "viewer"
156-
self.value = self.rawMessage["raiders"]
156+
self.value = int(self.rawMessage["raiders"])
157157
else:
158158
return False
159159
return True

ToDo.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Bugs / Outstanding
22
===================
33

44
No Twitch Bits option on testing list
5-
5+
Add for:"widget" to ignore list. {'type': 'reload.instant', 'for': 'widget', 'event_id': 'evt_b977516287b607f9a899dc2936fff74a'}
66

77

88

@@ -17,4 +17,4 @@ Have a way to pause logs from updating and then resume to allow scrolling
1717
Support multiple calculated values via exec. Array in exec, to numbered strings in action script.
1818
Support multiple rcon commands as an array in JSON.
1919
Handle paused Factorio server accepting but not reply to RCON command. It will honor the command when the server is unpaused. So different between start test connection and event handling.
20-
Add a more complete test GUI with options to select subscription types, donation currencies, etc.
20+
Add a more complete test GUI with options to select subscription types, donation currencies, etc.

0 commit comments

Comments
 (0)