From d2ffa35f2ce08729bd2736c868b04e0ef4aa4a0c Mon Sep 17 00:00:00 2001 From: Jip Fr Date: Fri, 14 Apr 2023 19:32:34 +0200 Subject: [PATCH] fix(superstream): fix subtitle error on SuperStream --- src/backend/providers/superstream/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/backend/providers/superstream/index.ts b/src/backend/providers/superstream/index.ts index 9ebe6262..3c499739 100644 --- a/src/backend/providers/superstream/index.ts +++ b/src/backend/providers/superstream/index.ts @@ -229,9 +229,7 @@ registerProvider({ (subtitle: any): MWCaption | null => { const sub = subtitle; sub.subtitles = subtitle.subtitles.filter((subFile: any) => { - const extension = subFile.file_path.substring( - sub.file_path.length - 3 - ); + const extension = subFile.file_path.slice(-3); return [MWCaptionType.SRT, MWCaptionType.VTT].includes(extension); }); return {