1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2025-01-01 16:37:39 +01:00

Check for extension in scrape logic

This commit is contained in:
William Oldham 2024-01-23 21:44:53 +00:00
parent e0bbeeee84
commit 25ae949995
2 changed files with 4 additions and 4 deletions

View file

@ -42,7 +42,7 @@ export function useEmbedScraping(
let result: EmbedOutput | undefined;
if (!meta) return;
try {
if (providerApiUrl) {
if (providerApiUrl && !isExtensionActiveCached()) {
const baseUrlMaker = makeProviderUrl(providerApiUrl);
const conn = await connectServerSideEvents<EmbedOutput>(
baseUrlMaker.scrapeEmbed(embedId, url),
@ -107,7 +107,7 @@ export function useSourceScraping(sourceId: string | null, routerId: string) {
let result: SourcererOutput | undefined;
try {
if (providerApiUrl) {
if (providerApiUrl && !isExtensionActiveCached()) {
const baseUrlMaker = makeProviderUrl(providerApiUrl);
const conn = await connectServerSideEvents<SourcererOutput>(
baseUrlMaker.scrapeSource(sourceId, scrapeMedia),
@ -149,7 +149,7 @@ export function useSourceScraping(sourceId: string | null, routerId: string) {
let embedResult: EmbedOutput | undefined;
if (!meta) return;
try {
if (providerApiUrl) {
if (providerApiUrl && !isExtensionActiveCached()) {
const baseUrlMaker = makeProviderUrl(providerApiUrl);
const conn = await connectServerSideEvents<EmbedOutput>(
baseUrlMaker.scrapeEmbed(

View file

@ -159,7 +159,7 @@ export function useScrape() {
const startScraping = useCallback(
async (media: ScrapeMedia) => {
const providerApiUrl = getLoadbalancedProviderApiUrl();
if (providerApiUrl) {
if (providerApiUrl && !isExtensionActiveCached()) {
startScrape();
const baseUrlMaker = makeProviderUrl(providerApiUrl);
const conn = await connectServerSideEvents<RunOutput | "">(