From 9ed72a8dade3716a772d2fdda81893b65f06d6a9 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sat, 4 Aug 2018 12:25:13 -0500 Subject: [PATCH] Fix signature decryption for videos that don't have 'adaptive_fmts' --- src/invidious.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious.cr b/src/invidious.cr index 088bf8b8..870bddcc 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -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