Enforce game matching for badge campaigns

This commit is contained in:
DevilXD committed 2025-10-11 16:26:22 +02:00
1 parent a25c4a7bbb
commit 2388757ebe
2 files changed
+4 -8

No files matched your search

+1 -3
View File
@@ -458,9 +458,7 @@ class DropsCampaign:
# and the channel is live and playing the campaign's game # and the channel is live and playing the campaign's game
and ( and (
ignore_channel_status ignore_channel_status
or channel.game is not None or channel.game is not None and channel.game == self.game
and channel.game == self.game
or self.has_badge_or_emote
) )
) )
) )
+3 -5
View File
@@ -987,12 +987,10 @@ class Twitch:
if not channel.online or not channel.drops_enabled: if not channel.online or not channel.drops_enabled:
return False return False
# check if we can progress any campaign for the played game # 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: for campaign in self.inventory:
if ( if campaign.can_earn(channel):
campaign.can_earn(channel)
and (channel_game_valid or campaign.has_badge_or_emote)
):
return True return True
return False return False