diff --git a/backend/stream.py b/backend/stream.py index 7bcef3f..8c52fb7 100755 --- a/backend/stream.py +++ b/backend/stream.py @@ -139,9 +139,9 @@ class UpstreamHandler(): if self.provider in providers.keys(): self.valid = True path = handler.request.path - if self.provider == "nextcloud": + if self.provider.startswith("nextcloud"): path = path.removesuffix("/").removesuffix("download").removesuffix("/") - elif self.provider == "youtube": + elif self.provider.startswith("youtube"): path = path.removeprefix("/") self.upstream = providers[self.provider] + path proxy_list = proxies.get(self.provider) @@ -215,7 +215,7 @@ class MainHandler(tornado.web.RequestHandler): async def handle_render(self, handler): if template_script is not None and template_html is not None: provider_data = None - if handler.provider == "nextcloud": + if handler.provider.startswith("nextcloud"): provider_data = await stream_providers.get_nextcloud(handler.upstream, handler.proxy, logger) else: provider_data = await stream_providers.get_any(handler.upstream, handler.proxy, logger)