Fix raw parameter for videos in listen mode (#2270)

This commit is contained in:
syeopite 2021-07-28 16:28:09 -07:00 committed by GitHub
parent 0cdf13742a
commit 578bbcd181
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

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