mirror of
https://github.com/fHDHR/fHDHR_NextPVR.git
synced 2025-12-06 13:26:57 -05:00
Merge pull request #4 from deathbybandaid/dev
Just pull a single stream
This commit is contained in:
commit
06df50d941
@ -251,8 +251,7 @@ class HDHR_HTTP_Server():
|
|||||||
if 'method' in list(request.args.keys()):
|
if 'method' in list(request.args.keys()):
|
||||||
if 'channel' in list(request.args.keys()):
|
if 'channel' in list(request.args.keys()):
|
||||||
|
|
||||||
station_list = hdhr.serviceproxy.get_channel_streams()
|
channelUri = hdhr.serviceproxy.get_channel_stream(str(request.args["channel"]))
|
||||||
channelUri = station_list[str(request.args["channel"])]
|
|
||||||
if not channelUri:
|
if not channelUri:
|
||||||
abort(404)
|
abort(404)
|
||||||
|
|
||||||
|
|||||||
@ -181,6 +181,16 @@ class proxyserviceFetcher():
|
|||||||
total_channels += 1
|
total_channels += 1
|
||||||
return total_channels
|
return total_channels
|
||||||
|
|
||||||
|
def get_channel_stream(self, id):
|
||||||
|
url = ('%s%s:%s/live?channel=%s&client=%s' %
|
||||||
|
("https://" if self.config["nextpvr"]["ssl"] else "http://",
|
||||||
|
self.config["nextpvr"]["address"],
|
||||||
|
str(self.config["nextpvr"]["port"]),
|
||||||
|
str(id),
|
||||||
|
str(id),
|
||||||
|
))
|
||||||
|
return url
|
||||||
|
|
||||||
def get_channel_streams(self):
|
def get_channel_streams(self):
|
||||||
streamdict = {}
|
streamdict = {}
|
||||||
for c in self.get_channels():
|
for c in self.get_channels():
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user