mirror of
https://github.com/p-stream/providers.git
synced 2026-03-11 17:55:36 +00:00
Better error handling for superstream
This commit is contained in:
parent
fee543642e
commit
2f02522ca6
2 changed files with 4 additions and 2 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue