From 965cc56570424e4929ff0754b5d9ff731ceebc84 Mon Sep 17 00:00:00 2001 From: mrjvs Date: Thu, 18 Jan 2024 19:21:43 +0100 Subject: [PATCH] Fix bug where stream freezes without extension Co-authored-by: Jip Frijlink --- src/hooks/useProviderScrape.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hooks/useProviderScrape.tsx b/src/hooks/useProviderScrape.tsx index d6b48063..fd27c06d 100644 --- a/src/hooks/useProviderScrape.tsx +++ b/src/hooks/useProviderScrape.tsx @@ -5,6 +5,7 @@ import { } from "@movie-web/providers"; import { RefObject, useCallback, useEffect, useRef, useState } from "react"; +import { isExtensionActiveCached } from "@/backend/extension/messaging"; import { prepareStream } from "@/backend/extension/streams"; import { connectServerSideEvents, @@ -186,7 +187,8 @@ export function useScrape() { discoverEmbeds: discoverEmbedsEvent, }, }); - if (output) await prepareStream(output.stream); + if (output && isExtensionActiveCached()) + await prepareStream(output.stream); return getResult(output); }, [