From 793fb5ccaf579c99cf3cc75d816362060697b639 Mon Sep 17 00:00:00 2001 From: DevilXD Date: Sun, 19 Feb 2023 16:23:06 +0100 Subject: [PATCH] Assume directory streams always have the tag --- channel.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/channel.py b/channel.py index 983aa22..9c36b05 100644 --- a/channel.py +++ b/channel.py @@ -55,14 +55,17 @@ class Stream: @classmethod def from_directory(cls, channel: Channel, data: JsonType) -> Stream: - return cls( + self = cls( channel, id=data["id"], game=data["game"], # has to be there since we searched with it viewers=data["viewersCount"], title=data["title"], - tags=data["tags"], + tags=[], ) + # HACK: we assume this is always the case for directory streams, since we search by the tag + self.drops_enabled = True + return self def __eq__(self, other: object) -> bool: if isinstance(other, self.__class__):