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

pull/77/head
Omar Roth 6 years ago
parent 3b323dc6b0
commit 9ed72a8dad

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

Loading…
Cancel
Save