diff --git a/backend/stream_providers.py b/backend/stream_providers.py index d83c094..2a24c2f 100755 --- a/backend/stream_providers.py +++ b/backend/stream_providers.py @@ -203,6 +203,8 @@ class StreamProvider: class StreamlinkRunner(StreamProvider): def stream(self): + if "youtube.com" in urllib.parse.urlparse(self.upstream).hostname.lower(): + return StreamData(None, None, None, None, None, None, False) try: session = None if self.proxy is None or self.proxy.proxy is None: @@ -212,7 +214,7 @@ class StreamlinkRunner(StreamProvider): media = session.resolve_url(self.upstream) streams = None if isinstance(media, tuple): - plugin = media[0](media[1]) + plugin = media[1](session=session, url=media[2]) streams = plugin.streams() else: streams = media.streams() @@ -393,8 +395,8 @@ async def get_any(upstream, proxy, logger): if isinstance(cached, StreamData): return cached tasks = [] - if not "youtube" in upstream.lower(): - tasks.append(asyncio.create_task(get_streamlink(upstream, proxy, logger))) + + tasks.append(asyncio.create_task(get_streamlink(upstream, proxy, logger))) tasks.append(asyncio.create_task(get_ytdl(upstream, proxy, logger))) tasks.append(asyncio.create_task(get_meta(upstream, proxy, logger)))