diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-03-28 18:52:02 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-03-28 18:52:02 -0500 |
| commit | f047f871002d675a7d5c8eff941c7b156d1ccdfb (patch) | |
| tree | 9c17c0c94382a1eb12ad1f598c7139c024ea9cbf | |
| parent | c172dac81195fdef3fe7aa4e180eea916ff8571c (diff) | |
| download | invidious-f047f871002d675a7d5c8eff941c7b156d1ccdfb.tar.gz invidious-f047f871002d675a7d5c8eff941c7b156d1ccdfb.tar.bz2 invidious-f047f871002d675a7d5c8eff941c7b156d1ccdfb.zip | |
Use alternative url for watch page thumbnails
| -rw-r--r-- | src/invidious.cr | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 40304149..1233bf5b 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 |
