diff --git a/src/invidious/routes/watch.cr b/src/invidious/routes/watch.cr index 2d2050dd..de5f952a 100644 --- a/src/invidious/routes/watch.cr +++ b/src/invidious/routes/watch.cr @@ -152,6 +152,7 @@ module Invidious::Routes::Watch end end + # Removes non default audio tracks audio_streams.reject! do |z| z if z.dig?("audioTrack", "audioIsDefault") == false end @@ -218,6 +219,12 @@ module Invidious::Routes::Watch captions: video.captions ) + begin + video_url = "https://#{URI.parse(fmt_stream[0]["url"].to_s).query_params["host"]}#{fmt_stream[0]["url"].to_s}" + rescue + video_url = nil + end + templated "watch" end diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr index 70afabcc..dd159fa2 100644 --- a/src/invidious/views/watch.ecr +++ b/src/invidious/views/watch.ecr @@ -13,9 +13,11 @@ - - - + + + + +