fix youtube upstream

This commit is contained in:
Roy Olav Purser 2021-05-25 12:14:49 +02:00
parent b5b7291604
commit 1647f35df1
Signed by: roypur
GPG Key ID: E14D26A036F21656
2 changed files with 5 additions and 3 deletions

View File

@ -156,11 +156,12 @@ class UpstreamHandler():
self.stream = True
path = handler.request.path
src = providers[self.provider] + path
if self.provider == "nextcloud":
src = src.removesuffix("/").removesuffix("download").removesuffix("/")
path = path.removesuffix("/").removesuffix("download").removesuffix("/")
elif self.provider == "youtube":
path = path.removeprefix("/")
src = providers[self.provider] + path
proxy_list = proxies.get(self.provider)
if isinstance(proxy_list, list):
futures = []

View File

@ -80,6 +80,7 @@ async def get_streamlink(upstream, proxy, logger):
async def get_any(upstream, proxy, logger):
tasks = []
logger.info(upstream)
tasks.append(asyncio.create_task(get_streamlink(upstream, proxy, logger)))
tasks.append(asyncio.create_task(get_ytdl(upstream, proxy, logger)))
result = None