mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Fix audio mode for raw URLs
This commit is contained in:
parent
0338fd42e1
commit
8cecce7570
1 changed files with 16 additions and 4 deletions
|
@ -470,6 +470,17 @@ get "/watch" do |env|
|
||||||
thumbnail = "/vi/#{video.id}/maxres.jpg"
|
thumbnail = "/vi/#{video.id}/maxres.jpg"
|
||||||
|
|
||||||
if params.raw
|
if params.raw
|
||||||
|
if params.listen
|
||||||
|
url = audio_streams[0]["url"]
|
||||||
|
|
||||||
|
audio_streams.each do |fmt|
|
||||||
|
pp fmt["bitrate"]
|
||||||
|
pp params.quality.rchop("k")
|
||||||
|
if fmt["bitrate"] == params.quality.rchop("k")
|
||||||
|
url = fmt["url"]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
url = fmt_stream[0]["url"]
|
url = fmt_stream[0]["url"]
|
||||||
|
|
||||||
fmt_stream.each do |fmt|
|
fmt_stream.each do |fmt|
|
||||||
|
@ -477,6 +488,7 @@ get "/watch" do |env|
|
||||||
url = fmt["url"]
|
url = fmt["url"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
next env.redirect url
|
next env.redirect url
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue