From 1647f35df1a96efdfb43377506c76c1aa9b9057a Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Tue, 25 May 2021 12:14:49 +0200 Subject: [PATCH] fix youtube upstream --- backend/stream.py | 7 ++++--- backend/stream_providers.py | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/stream.py b/backend/stream.py index 303b7b4..563a3d9 100755 --- a/backend/stream.py +++ b/backend/stream.py @@ -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 = [] diff --git a/backend/stream_providers.py b/backend/stream_providers.py index aec38d3..00ccda4 100755 --- a/backend/stream_providers.py +++ b/backend/stream_providers.py @@ -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