mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Fix watch for videos that don't have fmt_stream
This commit is contained in:
parent
6167ce30b0
commit
d4c88f2844
2 changed files with 11 additions and 7 deletions
|
@ -151,11 +151,13 @@ get "/watch" do |env|
|
|||
fmt_stream << HTTP::Params.parse(string)
|
||||
end
|
||||
|
||||
if fmt_stream[0]?
|
||||
if fmt_stream[0]["s"]?
|
||||
fmt_stream.each do |fmt|
|
||||
fmt["url"] = "#{fmt["url"]}&signature=#{decrypt_signature(fmt["s"])}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# We want lowest quality first
|
||||
fmt_stream.reverse!
|
||||
|
@ -167,11 +169,13 @@ get "/watch" do |env|
|
|||
end
|
||||
end
|
||||
|
||||
if adaptive_fmts[0]?
|
||||
if adaptive_fmts[0]["s"]?
|
||||
adaptive_fmts.each do |fmt|
|
||||
fmt["url"] = "#{fmt["url"]}&signature=#{decrypt_signature(fmt["s"])}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
rvs = [] of Hash(String, String)
|
||||
if video.info.has_key?("rvs")
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<% slice.each do |video| %>
|
||||
<div class="pure-u-1 pure-u-md-1-4">
|
||||
<div style="margin:1em;">
|
||||
<a style="width:100%;" class="link" href="/watch?v=<%= video["link"] %>">
|
||||
<a style="width:100%;" class="link" href="<%= video["link"] %>">
|
||||
<img style="width:100%;" src="<%= video["thumbnail"] %>"/>
|
||||
<%= video["title"] %>
|
||||
</a>
|
||||
|
|
Loading…
Reference in a new issue