From 23fafb5f436e54dcb261205317ccc4cbcb9a6f29 Mon Sep 17 00:00:00 2001 From: SalvadorSTM Date: Wed, 16 Aug 2023 01:55:04 -0400 Subject: [PATCH] add LOSE annotation to analytics page --- TwitchChannelPointsMiner/classes/WebSocketsPool.py | 2 +- TwitchChannelPointsMiner/classes/entities/Streamer.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/TwitchChannelPointsMiner/classes/WebSocketsPool.py b/TwitchChannelPointsMiner/classes/WebSocketsPool.py index f08f9d2..258b2b2 100644 --- a/TwitchChannelPointsMiner/classes/WebSocketsPool.py +++ b/TwitchChannelPointsMiner/classes/WebSocketsPool.py @@ -380,7 +380,7 @@ class WebSocketsPool: counter=-1, ) - if event_prediction.result["type"] != "LOSE": + if event_prediction.result["type"]: # Analytics switch if Settings.enable_analytics is True: ws.streamers[ diff --git a/TwitchChannelPointsMiner/classes/entities/Streamer.py b/TwitchChannelPointsMiner/classes/entities/Streamer.py index 1b64ab4..82f28d7 100644 --- a/TwitchChannelPointsMiner/classes/entities/Streamer.py +++ b/TwitchChannelPointsMiner/classes/entities/Streamer.py @@ -207,11 +207,11 @@ class Streamer(object): # === ANALYTICS === # def persistent_annotations(self, event_type, event_text): event_type = event_type.upper() - if event_type in ["WATCH_STREAK", "WIN", "PREDICTION_MADE"]: + if event_type in ["WATCH_STREAK", "WIN", "PREDICTION_MADE", "LOSE"]: primary_color = ( - "#45c1ff" + "#45c1ff" #blue #45c1ff yellow #ffe045 green #36b535 red #ff4545 if event_type == "WATCH_STREAK" - else ("#ffe045" if event_type == "PREDICTION_MADE" else "#54ff45") + else ("#ffe045" if event_type == "PREDICTION_MADE" else ("#36b535" if event_type == "WIN" else "#ff4545")) ) data = { "borderColor": primary_color,