fix youtube upstream
This commit is contained in:
parent
b5b7291604
commit
1647f35df1
@ -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 = []
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user