diff --git a/src/providers/sources/superstream/common.ts b/src/providers/sources/superstream/common.ts index 99299a2..6ad1448 100644 --- a/src/providers/sources/superstream/common.ts +++ b/src/providers/sources/superstream/common.ts @@ -11,7 +11,4 @@ export const apiUrls = [ ]; export const appKey = atob('bW92aWVib3g='); export const appId = atob('Y29tLnRkby5zaG93Ym94'); -export const captionsDomains = [ - atob('bWJwaW1hZ2VzLmNodWF4aW4uY29t'), - atob('aW1hZ2VzLnNoZWd1Lm5ldA=='), -]; \ No newline at end of file +export const captionsDomains = [atob('bWJwaW1hZ2VzLmNodWF4aW4uY29t'), atob('aW1hZ2VzLnNoZWd1Lm5ldA==')]; diff --git a/src/providers/sources/superstream/subtitles.ts b/src/providers/sources/superstream/subtitles.ts index 9eef467..36be8de 100644 --- a/src/providers/sources/superstream/subtitles.ts +++ b/src/providers/sources/superstream/subtitles.ts @@ -42,9 +42,12 @@ export async function getSubtitles( subtitleList.forEach((sub) => { const subtitle = sub.subtitles.sort((a, b) => b.order - a.order)[0]; if (!subtitle) return; - const subtitleFilePath = subtitle.file_path.replace(captionsDomains[0], captionsDomains[1]).replace(/\s/g, '+').replace(/[()]/g, (c) => { - return '%' + c.charCodeAt(0).toString(16); - }); + const subtitleFilePath = subtitle.file_path + .replace(captionsDomains[0], captionsDomains[1]) + .replace(/\s/g, '+') + .replace(/[()]/g, (c) => { + return `%${c.charCodeAt(0).toString(16)}`; + }); const subtitleType = getCaptionTypeFromUrl(subtitleFilePath); if (!subtitleType) return;