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 {