Assume directory streams always have the tag

This commit is contained in:
DevilXD committed 2023-02-19 16:23:06 +01:00
1 parent 4100ae5661
commit 793fb5ccaf
1 file changed
+5 -2
+5 -2
View File
@@ -55,14 +55,17 @@ class Stream:
@classmethod @classmethod
def from_directory(cls, channel: Channel, data: JsonType) -> Stream: def from_directory(cls, channel: Channel, data: JsonType) -> Stream:
return cls( self = cls(
channel, channel,
id=data["id"], id=data["id"],
game=data["game"], # has to be there since we searched with it game=data["game"], # has to be there since we searched with it
viewers=data["viewersCount"], viewers=data["viewersCount"],
title=data["title"], 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: def __eq__(self, other: object) -> bool:
if isinstance(other, self.__class__): if isinstance(other, self.__class__):