diff --git a/package.json b/package.json index 7e46376..50e8c39 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@movie-web/providers", - "version": "1.1.1", + "version": "1.1.2", "description": "Package that contains all the providers of movie-web", "main": "./lib/index.umd.js", "types": "./lib/index.d.ts", diff --git a/src/providers/sources/superstream/getStreamQualities.ts b/src/providers/sources/superstream/getStreamQualities.ts index 655964d..5e82b4c 100644 --- a/src/providers/sources/superstream/getStreamQualities.ts +++ b/src/providers/sources/superstream/getStreamQualities.ts @@ -9,8 +9,6 @@ export async function getStreamQualities(ctx: ScrapeContext, apiQuery: object) { const mediaRes: { list: { path: string; quality: string; fid?: number }[] } = (await sendRequest(ctx, apiQuery)).data; ctx.progress(66); - console.log(mediaRes); - const qualityMap = mediaRes.list .filter((file) => allowedQualities.includes(file.quality.replace('p', ''))) .map((file) => ({ diff --git a/src/providers/sources/superstream/subtitles.ts b/src/providers/sources/superstream/subtitles.ts index d49171d..6516dfc 100644 --- a/src/providers/sources/superstream/subtitles.ts +++ b/src/providers/sources/superstream/subtitles.ts @@ -27,7 +27,8 @@ export async function getSubtitles( fid, uid: '', module, - mid: id, + mid: type === 'movie' ? id : undefined, + tid: type !== 'movie' ? id : undefined, episode: episodeId?.toString(), season: seasonId?.toString(), group: episodeId ? '' : undefined, @@ -37,7 +38,7 @@ export async function getSubtitles( const output: Caption[] = []; subtitleList.forEach((sub) => { - const subtitle = sub.subtitles.sort((a, b) => a.order - b.order)[0]; + const subtitle = sub.subtitles.sort((a, b) => b.order - a.order)[0]; if (!subtitle) return; const subtitleType = getCaptionTypeFromUrl(subtitle.file_path); if (!subtitleType) return;