From 6152e1881df81bb69687a4b5e38f1618d15360a9 Mon Sep 17 00:00:00 2001 From: mrjvs Date: Thu, 7 Dec 2023 14:36:08 +0100 Subject: [PATCH 1/2] Fix superstream subs Co-authored-by: elpaxel <45597512+elpaxel@users.noreply.github.com> --- src/backend/providers/superstream/index.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/backend/providers/superstream/index.ts b/src/backend/providers/superstream/index.ts index 1ab8a36d..b984cc48 100644 --- a/src/backend/providers/superstream/index.ts +++ b/src/backend/providers/superstream/index.ts @@ -39,6 +39,10 @@ const apiUrls = [ ]; const appKey = atob("bW92aWVib3g="); const appId = atob("Y29tLnRkby5zaG93Ym94"); +const captionsDomains = [ + atob("bWJwaW1hZ2VzLmNodWF4aW4uY29t"), + atob("aW1hZ2VzLnNoZWd1Lm5ldA=="), +]; // cryptography stuff const crypto = { @@ -119,11 +123,18 @@ const convertSubtitles = (subtitleGroup: any): MWCaption | null => { let subtitles = subtitleGroup.subtitles; subtitles = subtitles .map((subFile: any) => { - const supported = isSupportedSubtitle(subFile.file_path); + const filePath = subFile.file_path + .replace(captionsDomains[0], captionsDomains[1]) + .replace(/\s/g, "+") + .replace(/[()]/g, (c: string) => { + return `%${c.charCodeAt(0).toString(16)}`; + }); + const supported = isSupportedSubtitle(filePath); if (!supported) return null; - const type = getMWCaptionTypeFromUrl(subFile.file_path); + const type = getMWCaptionTypeFromUrl(filePath); return { ...subFile, + file_path: filePath, type: type as MWCaptionType, }; }) From 3accf133f17f4cae0d76c0f03efedb718d478c2e Mon Sep 17 00:00:00 2001 From: mrjvs Date: Thu, 7 Dec 2023 14:36:46 +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 2390656b..4a79c0c1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "movie-web", - "version": "3.2.5", + "version": "3.2.6", "private": true, "homepage": "https://movie-web.app", "dependencies": {