From 743ce20c0e9f2e8122458ea16aea0872a38737a4 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Thu, 8 Dec 2022 22:05:31 -0500 Subject: [PATCH] Small refactor --- src/components/VideoPlayer/VideoPlayer.bs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/components/VideoPlayer/VideoPlayer.bs b/src/components/VideoPlayer/VideoPlayer.bs index 141abf79..bebdbbf6 100644 --- a/src/components/VideoPlayer/VideoPlayer.bs +++ b/src/components/VideoPlayer/VideoPlayer.bs @@ -108,14 +108,9 @@ function OnVideoDetailsTaskResults() as void if metadata.formatStreams.Count() > 0 stream = metadata.formatStreams[metadata.formatStreams.Count() - 1] itag = stream.itag - streamUrl = Invidious.GetVideoUrl(videoId, itag, false) - playletStreamUrls.push(streamUrl) - if streamUrl.InStr("?") = -1 - streamUrlLocal = streamUrl + "?local=true" - else - streamUrlLocal = streamUrl + "&local=true" - end if - playletStreamUrls.push(streamUrlLocal) + + playletStreamUrls.push(Invidious.GetVideoUrl(videoId, itag, false)) + playletStreamUrls.push(Invidious.GetVideoUrl(videoId, itag, true)) end if end if