Add a check to ensure that we have online channels
This commit is contained in:
parent
26bd3931a6
commit
e8b725484a
|
@ -35,6 +35,8 @@ class Picarto:
|
|||
# Channel is the name we are checking against that
|
||||
# This creates a list of all users that match this channel name (should only ever be 1)
|
||||
# And returns True as long as it is more than 0
|
||||
if not self.channels:
|
||||
return False
|
||||
channel = re.search("(?<=picarto.tv/)(.*)", channel).group(1)
|
||||
matches = [stream for stream in self.online_channels if stream['channel_name'].lower() == channel.lower()]
|
||||
return len(matches) > 0
|
||||
|
|
Loading…
Reference in a new issue