Skip to content

Commit

Permalink
Fix missing credentials for streaming of recordings
Browse files Browse the repository at this point in the history
Tnx anudanan
  • Loading branch information
Schimmelreiter committed Jan 11, 2019
1 parent 654f178 commit 96135f3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion plugin/controllers/models/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,16 @@ def getTS(self, request):
if m is not None:
portNumber = m.group(1)

response = "#EXTM3U \n#EXTVLCOPT--http-reconnect=true \n%s%s://%s:%s/file?file=%s%s\n" % ((progopt, proto, request.getRequestHostname(), portNumber, quote(filename), args))
if config.OpenWebif.auth_for_streaming.value:
asession = GetSession()
if asession.GetAuth(request) is not None:
auth = ':'.join(asession.GetAuth(request)) + "@"
else:
auth = '-sid:' + str(asession.GetSID(request)) + "@"
else:
auth = ''

response = "#EXTM3U \n#EXTVLCOPT--http-reconnect=true \n%s%s://%s%s:%s/file?file=%s%s\n" % ((progopt, proto, auth, request.getRequestHostname(), portNumber, quote(filename), args))
request.setHeader('Content-Type', 'application/x-mpegurl')
return response
else:
Expand Down

0 comments on commit 96135f3

Please sign in to comment.