Fix signature decryption for videos that don't have 'adaptive_fmts'

This commit is contained in:
Omar Roth 2018-08-04 12:25:13 -05:00
parent 3b323dc6b0
commit 9ed72a8dad
1 changed files with 1 additions and 1 deletions

View File

@ -344,7 +344,7 @@ get "/watch" do |env|
end
end
if adaptive_fmts[0]? && adaptive_fmts[0]["s"]?
if fmt_stream[0]? && fmt_stream[0]["s"]?
adaptive_fmts.each do |fmt|
fmt["url"] += "&signature=" + decrypt_signature(fmt["s"], decrypt_function)
end