mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-21 14:47:41 +01:00
Merge pull request #813 from movie-web/hotfix/provider-api
Check for extension in scrape logic
This commit is contained in:
commit
6371478d0b
3 changed files with 5 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "movie-web",
|
"name": "movie-web",
|
||||||
"version": "4.3.0",
|
"version": "4.3.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": "https://movie-web.app",
|
"homepage": "https://movie-web.app",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -42,7 +42,7 @@ export function useEmbedScraping(
|
||||||
let result: EmbedOutput | undefined;
|
let result: EmbedOutput | undefined;
|
||||||
if (!meta) return;
|
if (!meta) return;
|
||||||
try {
|
try {
|
||||||
if (providerApiUrl) {
|
if (providerApiUrl && !isExtensionActiveCached()) {
|
||||||
const baseUrlMaker = makeProviderUrl(providerApiUrl);
|
const baseUrlMaker = makeProviderUrl(providerApiUrl);
|
||||||
const conn = await connectServerSideEvents<EmbedOutput>(
|
const conn = await connectServerSideEvents<EmbedOutput>(
|
||||||
baseUrlMaker.scrapeEmbed(embedId, url),
|
baseUrlMaker.scrapeEmbed(embedId, url),
|
||||||
|
@ -107,7 +107,7 @@ export function useSourceScraping(sourceId: string | null, routerId: string) {
|
||||||
|
|
||||||
let result: SourcererOutput | undefined;
|
let result: SourcererOutput | undefined;
|
||||||
try {
|
try {
|
||||||
if (providerApiUrl) {
|
if (providerApiUrl && !isExtensionActiveCached()) {
|
||||||
const baseUrlMaker = makeProviderUrl(providerApiUrl);
|
const baseUrlMaker = makeProviderUrl(providerApiUrl);
|
||||||
const conn = await connectServerSideEvents<SourcererOutput>(
|
const conn = await connectServerSideEvents<SourcererOutput>(
|
||||||
baseUrlMaker.scrapeSource(sourceId, scrapeMedia),
|
baseUrlMaker.scrapeSource(sourceId, scrapeMedia),
|
||||||
|
@ -149,7 +149,7 @@ export function useSourceScraping(sourceId: string | null, routerId: string) {
|
||||||
let embedResult: EmbedOutput | undefined;
|
let embedResult: EmbedOutput | undefined;
|
||||||
if (!meta) return;
|
if (!meta) return;
|
||||||
try {
|
try {
|
||||||
if (providerApiUrl) {
|
if (providerApiUrl && !isExtensionActiveCached()) {
|
||||||
const baseUrlMaker = makeProviderUrl(providerApiUrl);
|
const baseUrlMaker = makeProviderUrl(providerApiUrl);
|
||||||
const conn = await connectServerSideEvents<EmbedOutput>(
|
const conn = await connectServerSideEvents<EmbedOutput>(
|
||||||
baseUrlMaker.scrapeEmbed(
|
baseUrlMaker.scrapeEmbed(
|
||||||
|
|
|
@ -159,7 +159,7 @@ export function useScrape() {
|
||||||
const startScraping = useCallback(
|
const startScraping = useCallback(
|
||||||
async (media: ScrapeMedia) => {
|
async (media: ScrapeMedia) => {
|
||||||
const providerApiUrl = getLoadbalancedProviderApiUrl();
|
const providerApiUrl = getLoadbalancedProviderApiUrl();
|
||||||
if (providerApiUrl) {
|
if (providerApiUrl && !isExtensionActiveCached()) {
|
||||||
startScrape();
|
startScrape();
|
||||||
const baseUrlMaker = makeProviderUrl(providerApiUrl);
|
const baseUrlMaker = makeProviderUrl(providerApiUrl);
|
||||||
const conn = await connectServerSideEvents<RunOutput | "">(
|
const conn = await connectServerSideEvents<RunOutput | "">(
|
||||||
|
|
Loading…
Reference in a new issue