add nextcloud support
This commit is contained in:
parent
23596f3c1b
commit
cabccfa7b5
@ -22,6 +22,11 @@ providers["nrk"] = "https://tv.nrk.no"
|
||||
providers["svt"] = "https://svtplay.se"
|
||||
providers["youtube"] = "https://www.youtube.com/watch?v="
|
||||
providers["twitch"] = "https://twitch.tv"
|
||||
|
||||
nextcloud_server = os.environ.get("NEXTCLOUD_SERVER")
|
||||
if nextcloud_server is not None:
|
||||
providers["nextcloud"] = nextcloud_server
|
||||
|
||||
playlist = None
|
||||
icecast_server = os.environ.get("ICECAST_SERVER")
|
||||
stream_server = os.environ.get("STREAM_SERVER")
|
||||
@ -341,8 +346,11 @@ class MainHandler(tornado.web.RequestHandler):
|
||||
self.write("HTML template missing.")
|
||||
|
||||
async def handle_stream(self, handler, redir):
|
||||
streams = None
|
||||
upstream = await stream_providers.get_any(handler.upstream, handler.proxy, logger)
|
||||
upstream = None
|
||||
if handler.provider == "nextcloud":
|
||||
upstream = handler.upstream
|
||||
else:
|
||||
upstream = await stream_providers.get_any(handler.upstream, handler.proxy, logger)
|
||||
if upstream is None:
|
||||
logger.info(f'invalid upstream ({handler.provider})')
|
||||
self.set_status(404)
|
||||
|
Loading…
Reference in New Issue
Block a user