diff --git a/inventory.py b/inventory.py index 28357f2..a8d9347 100644 --- a/inventory.py +++ b/inventory.py @@ -298,7 +298,7 @@ class TimedDrop(BaseDrop): self._twitch.gui.inv.update_drop(self) def _update_real_minutes(self, delta: int) -> None: - if delta == 0 or self.real_current_minutes + delta < 0 or not self.can_earn(): + if delta == 0 or self.real_current_minutes + delta < 0: return if self.real_current_minutes + delta < self.required_minutes: self.real_current_minutes += delta diff --git a/twitch.py b/twitch.py index e27f486..86fd129 100644 --- a/twitch.py +++ b/twitch.py @@ -845,7 +845,7 @@ class Twitch: # NOTE: we need to sort the channels every time because one channel # can end up streaming any game - channels aren't game-tied for channel in sorted(channels.values(), key=self.get_priority): - if self.can_watch(channel) and self.should_switch(channel): + if self.should_switch(channel): new_watching = channel break watching_channel = self.watching_channel.get_with_default(None) @@ -1003,8 +1003,10 @@ class Twitch: """ Determines if the given channel qualifies as a switch candidate. """ + if not self.can_watch(channel): + return False watching_channel = self.watching_channel.get_with_default(None) - if watching_channel is None: + if watching_channel is None or not self.can_watch(watching_channel): return True channel_order = self.get_priority(channel) watching_order = self.get_priority(watching_channel) @@ -1099,7 +1101,7 @@ class Twitch: if stream_before is None: if stream_after is not None: # Channel going ONLINE - if self.can_watch(channel) and self.should_switch(channel): + if self.should_switch(channel): # we can watch the channel, and we should self.print(_("status", "goes_online").format(channel=channel.name)) self.watch(channel) @@ -1139,8 +1141,8 @@ class Twitch: f"(🎁: {stream_before.drops_enabled and '✔' or '❌'} -> " f"{stream_after.drops_enabled and '✔' or '❌'})" ) - if self.can_watch(channel) and self.should_switch(channel): - # ... and we can and should watch it + if self.should_switch(channel): + # ... and we should watch it self.watch(channel) channel.display()