From 8d2ede89ca559f90e917575670d792f425066614 Mon Sep 17 00:00:00 2001 From: DevilXD <4180725+DevilXD@users.noreply.github.com> Date: Thu, 1 May 2025 17:42:38 +0200 Subject: [PATCH] Fix an issue with the miner trying to mine excluded games --- twitch.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/twitch.py b/twitch.py index ce6b466..65f5a1b 100644 --- a/twitch.py +++ b/twitch.py @@ -973,11 +973,15 @@ class Twitch: if not self.wanted_games: return False # exit early if stream is offline or drops aren't enabled - if (not channel.online or not channel.drops_enabled): + if not channel.online or not channel.drops_enabled: return False # check if we can progress any campaign for the played game + channel_game_valid: bool = channel.game is not None and channel.game in self.wanted_games for campaign in self.inventory: - if campaign.can_earn(channel): + if ( + campaign.can_earn(channel) + and (channel_game_valid or campaign.has_badge_or_emote) + ): return True return False