mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 12:43:25 +00:00
Better error handling for superstream
This commit is contained in:
@@ -43,6 +43,7 @@ export const superStreamScraper = makeSourcerer({
|
||||
};
|
||||
|
||||
const { qualities, fid } = await getStreamQualities(ctx, apiQuery);
|
||||
if (fid === undefined) throw new NotFoundError('No streamable file found');
|
||||
|
||||
return {
|
||||
embeds: [],
|
||||
@@ -90,6 +91,7 @@ export const superStreamScraper = makeSourcerer({
|
||||
};
|
||||
|
||||
const { qualities, fid } = await getStreamQualities(ctx, apiQuery);
|
||||
if (fid === undefined) throw new NotFoundError('No streamable file found');
|
||||
|
||||
return {
|
||||
embeds: [],
|
||||
|
@@ -31,10 +31,10 @@ export async function getSubtitles(
|
||||
tid: type !== 'movie' ? id : undefined,
|
||||
episode: episodeId?.toString(),
|
||||
season: seasonId?.toString(),
|
||||
group: episodeId ? '' : undefined,
|
||||
};
|
||||
|
||||
const subtitleList = ((await sendRequest(ctx, subtitleApiQuery)) as CaptionApiResponse).data.list;
|
||||
const subResult = (await sendRequest(ctx, subtitleApiQuery)) as CaptionApiResponse;
|
||||
const subtitleList = subResult.data.list;
|
||||
const output: Caption[] = [];
|
||||
|
||||
subtitleList.forEach((sub) => {
|
||||
|
Reference in New Issue
Block a user