1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-21 14:47:41 +01:00

Fix bug where stream freezes without extension

Co-authored-by: Jip Frijlink <JipFr@users.noreply.github.com>
This commit is contained in:
mrjvs 2024-01-18 19:21:43 +01:00
parent a226f3347c
commit 965cc56570

View file

@ -5,6 +5,7 @@ import {
} from "@movie-web/providers"; } from "@movie-web/providers";
import { RefObject, useCallback, useEffect, useRef, useState } from "react"; import { RefObject, useCallback, useEffect, useRef, useState } from "react";
import { isExtensionActiveCached } from "@/backend/extension/messaging";
import { prepareStream } from "@/backend/extension/streams"; import { prepareStream } from "@/backend/extension/streams";
import { import {
connectServerSideEvents, connectServerSideEvents,
@ -186,7 +187,8 @@ export function useScrape() {
discoverEmbeds: discoverEmbedsEvent, discoverEmbeds: discoverEmbedsEvent,
}, },
}); });
if (output) await prepareStream(output.stream); if (output && isExtensionActiveCached())
await prepareStream(output.stream);
return getResult(output); return getResult(output);
}, },
[ [