mirror of https://github.com/iv-org/invidious.git
Use alternative url for watch page thumbnails
This commit is contained in:
parent
c172dac811
commit
f047f87100
|
@ -266,8 +266,6 @@ get "/watch" do |env|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
player_response = JSON.parse(video.info["player_response"])
|
|
||||||
|
|
||||||
rating = video.info["avg_rating"].to_f64
|
rating = video.info["avg_rating"].to_f64
|
||||||
|
|
||||||
engagement = ((video.dislikes.to_f + video.likes.to_f)/video.views * 100)
|
engagement = ((video.dislikes.to_f + video.likes.to_f)/video.views * 100)
|
||||||
|
@ -293,7 +291,7 @@ get "/watch" do |env|
|
||||||
video.description = fill_links(video.description, "https", "www.youtube.com")
|
video.description = fill_links(video.description, "https", "www.youtube.com")
|
||||||
video.description = add_alt_links(video.description)
|
video.description = add_alt_links(video.description)
|
||||||
|
|
||||||
thumbnail = player_response["videoDetails"]["thumbnail"]["thumbnails"][-1]["url"]?
|
thumbnail = "https://i1.ytimg.com/vi/#{id}/mqdefault.jpg"
|
||||||
|
|
||||||
templated "watch"
|
templated "watch"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue