From b20893ab035599209bb2cf83088ccf3a042938ef Mon Sep 17 00:00:00 2001 From: DevilXD Date: Thu, 30 Jun 2022 22:28:24 +0200 Subject: [PATCH] Fix a potential issue with stream state not refreshing the watching payload --- channel.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/channel.py b/channel.py index d8b3a3f..f9f725b 100644 --- a/channel.py +++ b/channel.py @@ -62,6 +62,11 @@ class Stream: tags=data["tags"], ) + def __eq__(self, other: object) -> bool: + if isinstance(other, self.__class__): + return self.broadcast_id == other.broadcast_id + return NotImplemented + class Channel: def __init__( @@ -245,8 +250,8 @@ class Channel: async def check_online(self) -> bool: self._stream = await self.get_stream() + invalidate_cache(self, "_payload") if self._stream is None: - invalidate_cache(self, "_payload") return False return True