From f047f871002d675a7d5c8eff941c7b156d1ccdfb Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Wed, 28 Mar 2018 18:52:02 -0500 Subject: [PATCH] Use alternative url for watch page thumbnails --- src/invidious.cr | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index 40304149f..1233bf5bb 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -266,8 +266,6 @@ get "/watch" do |env| end end - player_response = JSON.parse(video.info["player_response"]) - rating = video.info["avg_rating"].to_f64 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 = add_alt_links(video.description) - thumbnail = player_response["videoDetails"]["thumbnail"]["thumbnails"][-1]["url"]? + thumbnail = "https://i1.ytimg.com/vi/#{id}/mqdefault.jpg" templated "watch" end