From 2388757ebe059170a32822e69693dbd3381ee3ec Mon Sep 17 00:00:00 2001 From: DevilXD <4180725+DevilXD@users.noreply.github.com> Date: Sat, 11 Oct 2025 16:26:22 +0200 Subject: [PATCH] Enforce game matching for badge campaigns --- inventory.py | 4 +--- twitch.py | 8 +++----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/inventory.py b/inventory.py index 6e8e9f8..4f25b06 100644 --- a/inventory.py +++ b/inventory.py @@ -458,9 +458,7 @@ class DropsCampaign: # and the channel is live and playing the campaign's game and ( ignore_channel_status - or channel.game is not None - and channel.game == self.game - or self.has_badge_or_emote + or channel.game is not None and channel.game == self.game ) ) ) diff --git a/twitch.py b/twitch.py index 26b3036..50bfa3f 100644 --- a/twitch.py +++ b/twitch.py @@ -987,12 +987,10 @@ class Twitch: 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 + if channel.game is None or channel.game not in self.wanted_games: + return False for campaign in self.inventory: - if ( - campaign.can_earn(channel) - and (channel_game_valid or campaign.has_badge_or_emote) - ): + if campaign.can_earn(channel): return True return False