@ -639,15 +639,18 @@ def main(channels, base_dir=".", qualities="source", metrics_port=8001, backdoor
managers = [ ]
managers = [ ]
for channel , important , type , url in channels :
for channel , important , type , url in channels :
channel_qualities = qualities
if type == " twitch " :
if type == " twitch " :
provider = TwitchProvider ( channel , auth_token = twitch_auth_token )
provider = TwitchProvider ( channel , auth_token = twitch_auth_token )
elif type == " url " :
elif type == " url " :
provider = URLProvider ( url )
provider = URLProvider ( url )
channel_qualities = [ " source " ]
elif type == " youtube " :
elif type == " youtube " :
provider = YoutubeProvider ( url )
provider = YoutubeProvider ( url )
channel_qualities = [ " source " ]
else :
else :
raise ValueError ( f " Unknown type { type !r} " )
raise ValueError ( f " Unknown type { type !r} " )
manager = StreamsManager ( provider , channel , base_dir , qualities, important = important )
manager = StreamsManager ( provider , channel , base_dir , channel_ qualities, important = important )
managers . append ( manager )
managers . append ( manager )
def stop ( ) :
def stop ( ) :