|
|
@ -167,11 +167,13 @@ class Invidious::Routes::Watch < Invidious::Routes::BaseRoute
|
|
|
|
if params.listen
|
|
|
|
if params.listen
|
|
|
|
url = audio_streams[0]["url"].as_s
|
|
|
|
url = audio_streams[0]["url"].as_s
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if params.quality.ends_with? "k"
|
|
|
|
audio_streams.each do |fmt|
|
|
|
|
audio_streams.each do |fmt|
|
|
|
|
if fmt["bitrate"].as_i == params.quality.rchop("k").to_i
|
|
|
|
if fmt["bitrate"].as_i == params.quality.rchop("k").to_i
|
|
|
|
url = fmt["url"].as_s
|
|
|
|
url = fmt["url"].as_s
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
else
|
|
|
|
else
|
|
|
|
url = fmt_stream[0]["url"].as_s
|
|
|
|
url = fmt_stream[0]["url"].as_s
|
|
|
|
|
|
|
|
|
|
|
|