mirror of
https://github.com/sussy-code/providers.git
synced 2026-08-14 19:25:12 +00:00
update fedapi
use diff link and handle error
This commit is contained in:
parent
3605142db7
commit
543fae03b1
1 changed files with 4 additions and 1 deletions
|
|
@ -6,7 +6,7 @@ import { NotFoundError } from '@/utils/errors';
|
|||
import { Caption } from '../captions';
|
||||
|
||||
// Thanks Nemo, Custom, and Roomba for this API
|
||||
const BASE_URL = 'https://febapi.bludclart.com';
|
||||
const BASE_URL = 'https://fed-api-production.up.railway.app';
|
||||
|
||||
async function comboScraper(ctx: ShowScrapeContext | MovieScrapeContext): Promise<SourcererOutput> {
|
||||
const apiUrl =
|
||||
|
|
@ -15,6 +15,9 @@ async function comboScraper(ctx: ShowScrapeContext | MovieScrapeContext): Promis
|
|||
: `${BASE_URL}/tv/${ctx.media.tmdbId}/${ctx.media.season.number}/${ctx.media.episode.number}`;
|
||||
|
||||
const data = await ctx.fetcher(apiUrl);
|
||||
if (data?.error === 'No quality list in FebBox response') {
|
||||
throw new NotFoundError('No stream found');
|
||||
}
|
||||
if (!data) throw new NotFoundError('No response from API');
|
||||
ctx.progress(50);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue