Simplify the logic of adding channels to the cache
This commit is contained in:
1 parent
79e685ed0b
commit
23ab930c0d
1 file changed
+2
-2
@@ -217,9 +217,9 @@ class Twitch:
|
|||||||
live_streams: List[Channel] = await self.get_live_streams(
|
live_streams: List[Channel] = await self.get_live_streams(
|
||||||
selected_game, [DROPS_ENABLED_TAG]
|
selected_game, [DROPS_ENABLED_TAG]
|
||||||
)
|
)
|
||||||
# filter out ones we already have
|
# add them, filtering out ones we already have
|
||||||
live_streams = [ch for ch in live_streams if ch.id not in self.channels]
|
|
||||||
for channel in live_streams:
|
for channel in live_streams:
|
||||||
|
if channel.id not in self.channels:
|
||||||
self.channels[channel.id] = channel
|
self.channels[channel.id] = channel
|
||||||
channel.display()
|
channel.display()
|
||||||
# load points
|
# load points
|
||||||
|
|||||||
Reference in new issue
Block a user