1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-20 14:37:43 +01:00

Merge pull request #813 from movie-web/hotfix/provider-api

Check for extension in scrape logic
This commit is contained in:
mrjvs 2024-01-23 22:47:35 +01:00 committed by GitHub
commit 6371478d0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View file

@ -1,6 +1,6 @@
{
"name": "movie-web",
"version": "4.3.0",
"version": "4.3.1",
"private": true,
"homepage": "https://movie-web.app",
"scripts": {

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 | "">(