From 91d7048243a999e692a8e9d1139a2f6c753301dd Mon Sep 17 00:00:00 2001 From: mansoor-roeen-glitch <75437785+mansoor-roeen-glitch@users.noreply.github.com> Date: Mon, 13 Sep 2021 23:59:49 +0530 Subject: [PATCH] Update Search.js --- src/views/Search.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/views/Search.js b/src/views/Search.js index f8b6adaf..78b03a13 100644 --- a/src/views/Search.js +++ b/src/views/Search.js @@ -54,13 +54,17 @@ export function SearchView() { } let realUrl = ''; + let subtitles = [] + if (type === "movie") { - const { url } = await getStreamUrl(slug, type, source); + const { url, subtitles: subs } = await getStreamUrl(slug, type, source); if (url === '') { return fail(`Not found: ${title}`) } + realUrl = url; + subtitles = subs } setProgress(maxSteps); @@ -72,7 +76,8 @@ export function SearchView() { episodes, slug, source, - year + year, + subtitles: subtitles }) setText(`Streaming...`) navigate("movie")