This commit is contained in:
deathbybandaid 2020-12-06 11:21:10 -05:00
parent f42f4cb43a
commit 8b3984debf

View File

@ -32,6 +32,8 @@ class OriginChannels():
def get_channel_stream(self, chandict):
try:
stream_json_path = 'channels/channel/%s/onnow.json' % str(chandict["origin_id"])
stream_id_url = self.base_api + stream_json_path
stream_id = self.fhdhr.web.session.get(stream_id_url).json()["id"]
@ -44,6 +46,9 @@ class OriginChannels():
for source in provider["sources"]:
streamurls.append(source["uri"])
streamurl = streamurls[0]
except KeyError:
return None
if self.fhdhr.config.dict["origin"]["force_best"]:
streamurl = self.m3u8_beststream(streamurl)
return streamurl