From c7cb8c2d1e479e0f80d37e91bc97bbdaf53490bb Mon Sep 17 00:00:00 2001 From: mrjvs Date: Sun, 19 Nov 2023 16:12:31 +0100 Subject: [PATCH 1/2] Fixed superstream for shows + remove console log + better subtitle selection --- src/providers/sources/superstream/getStreamQualities.ts | 2 -- src/providers/sources/superstream/subtitles.ts | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) 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; From fee543642e99974b39558dea30ecc065ccfde0a0 Mon Sep 17 00:00:00 2001 From: mrjvs Date: Sun, 19 Nov 2023 16:12:44 +0100 Subject: [PATCH 2/2] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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",